From the course: Using Entity Framework Core with Legacy Databases
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Populate a SQLite database
From the course: Using Entity Framework Core with Legacy Databases
Populate a SQLite database
- [Instructor] Now let's try and get some data into our new SQLite database. SQLite has some limitations compared to MS SQL Server. One of those limitations is generated columns. For now, we're going to remove these columns from our model. In a production environment, you'd have two separate contexts rather than having the SQLite context extend the MS SQL context. Let's open the Model folder, and open the Order model. We'll remove the LastUpdate column. Now, we'll go to the Customer model, and remove CmpLastFirst, the computed column. Save these two files, and we'll go to the context to remove them there. Scroll down to the error and remove the property. Then we'll go down to the next error, and remove this column as well. With those columns removed, we'll save this file. Now, we need to recreate our SQLite database without those columns. We'll start by removing the migration we created in the last video. And we can right-click on Project, Open Folder in File Explorer, to delete the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.