From the course: Using Entity Framework Core with Legacy Databases

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Create a SQLite database

Create a SQLite database

From the course: Using Entity Framework Core with Legacy Databases

Start my 1-month free trial

Create a SQLite database

- [Instructor] H+ Sports has decided that they want to develop a mobile app. We'd like to use a SQLite Database for that app, and we can use Entity Framework Core to create it from our existing MS SQL database. In this video, we'll create a new DB context to build a schema for the SQLite Database. In a next video, we'll copy over the data from our existing database with Entity Framework Core. Before we get started, let's download a SQLite Browser that we can use to view the new database. I've selected SQLite Browser, which I have downloaded from www.sqlitebrowser.org. First, we'll need to add the SQL Libraries to our project. Open a console window and navigate to the project folder. Like we did for the Main Entity Framework Core Libraries, we'll do .net, add package, Microsoft.EntityFrameworkCore, but this time we'll use Sqlite. Now we can go to visual studio and add a new DB context for our SQLite Database. We'll open the Models folder, right-click and add class. We'll name this…

Contents