Connect C# to SQLite using EF Core

Connect C# to SQLite using EF Core


In this tutorial, we’ll walk you through how to create an Entity Framework Core model and connect .NET console application to SQLite database. We’ll cover how to set up your connection, install the necessary packages, and use Entity Developer to generate a model based on your SQLite database. By the end of this video, you’ll be able to retrieve data from your SQLite tables directly into your .NET console application.

Timestamps
0:00 – Introduction
0:34 – Creating a new console application in Visual Studio
0:45 – Connecting to SQLite database in Visual Studio
1:29 – Setting up Entity Framework Core and dotConnect for SQLite
1:53 – Creating an Entity Framework Core model using Entity Developer
3:48 – Connecting to the database and retrieving data
4:10 – Conclusion

🔗 Code Example: https://dotnetfiddle.net/JhOV7z

👉 Tutorial: https://www.devart.com/dotconnect/sqlite/ef-core-sqlite-using.html

👉 Check full overview of dotConnect for SQLite here: https://www.devart.com/dotconnect/sqlite/

⬇️ You can download dotConnect for SQLite trial here: https://www.devart.com/dotconnect/sqlite/download.html

🔔 Subscribe to our channel and get dozens of tutorials about Devart tools: @DevartSoftware

#sqlite #dotnet #nuget #entityframework #entityframeworkcore #csharp #csharptutorial #csharpprogramming
Closed Caption:

[Music]
in today's video we'll demonstrate how
to make the Entity framework core model
visually and connect.net console
application to the sell light database
you have the option to choose between a
free trial and the full version the free
trial lasts 30 days providing access to
all features it's not for commercial use
and doesn't require a license key to
begin simply download the installer from
the devart website and install it if you
decide to buy the full version your
activation key can be found in the
devart customer portal to get started
you'll first need to create a new
console application project in Visual
Studio before we start coding let's take
a quick look at some data from the seite
database rightclick on data connections
then select add connection input your
sville light connection properties keep
in mind that the do connect for sville
light perfectly works with Sigel light
encryption extension an add-on that
encrypts Sigel light database
and fully supports a wide range of svel
light specific
features once the connection is live
expand the svel light connection to see
all the available tables for example
let's open the tables to inspect its
Fields you can retrieve data from the
tables to review the structure of the
data next up let's get the necessary
components to enable Vel light
connectivity rightclick on the solution
Explorer then select the new get package
manager search for Entity framework core
and click
install after that install the devart
data sville light EF core
package add a new data item to your
project choose devart EF core model and
click add
in the create model wizard choose
database first then fill in the details
of your svel light database connection
select which database objects and model
contents you want to scaffold let's use
some related tables from the sakila
database Define the naming conventions
for your property names then move to the
model properties page here you'll
specify where your connection properties
will be saved the EF core version and
Target framework you need and adjust
other settings like the context class
name or name spaces click next when done
now you'll choose what content to
include in the model diagram you can
either use all entities split the
entities by database or make a custom
selection based on your
needs next choose code generation
templates for your objects feel free to
adjust parameters for a tailored setup
for this tutorial let's stick with the
default settings since we've already
added the necessary new get package to
the project uncheck the new get package
box finally click finish our model is
ready we've now created the model if you
ever need to add new properties modify
associations or update existing class
attributes you can do so easily with the
visual
tools after making changes you can
update the database from the model or
generate script for the database in the
next part of this tutorial we'll go over
data context and DB context
classes let's add the license key
parameter to the connection
strings now in our application we're
going to connect to the database and
retrieve data from the film and film
category tables once we run the
application the console window will
display the result showing whether the
connection to svel light was
successfully established and whether
sample table rows were
fetched this tutorial covered the
essential steps to make EF core model
and connectnet console application using
connect for sville light thank you for
watching this tutorial we hope you found
it helpful feel free to share the video
with anyone who might benefit from it

Video Length: 04:28
Uploaded By: Devart
Published: 3/27/2025
View Count: 522

Related Software Products
dotConnect for SQLite
dotConnect for SQLite

Published By:
Devart

Description:
dotConnect for SQLite: an ADO.NET Provider for SQLite With Built-In Encryption and EF Core Support dotConnect for SQLite is a $269.95-a-year ADO.NET data provider from Devart for C#, VB.NET and F# developers who store data in SQLite files. It runs on .NET 5 to 11 and .NET Framework 2.0 to 4.8 on Windows, Linux and macOS, supports Entity Framework Core 1 to 11, EF6, Dapper and NHibernate, and adds database encryption, script and dump components...


Related Videos
Connect SQLite with C#
Connect SQLite with C#

Video Length: 02:22
Uploaded By: Devart (4/11/2025)
View Count: 593

Connect .NET Blazor to SQLite
Connect .NET Blazor to SQLite

Video Length: 02:43
Uploaded By: Devart (4/24/2025)
View Count: 300

dotConnect for SQLite: Fast .NET data access with ORM and encryption support
dotConnect for SQLite: Fast .NET data access with ORM and encryption support

Video Length: 02:18
Uploaded By: Devart (8/29/2025)
View Count: 155

Connect SQLite using Dapper ORM
Connect SQLite using Dapper ORM

Video Length: 03:23
Uploaded By: Devart (1/5/2026)
View Count: 137

Copyright © 2026, Ivertech. All rights reserved.