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.

Choose your approach

Choose your approach

From the course: Using Entity Framework Core with Legacy Databases

Start my 1-month free trial

Choose your approach

- [Instructor] Now that we're connected, we need to choose the approach that we're going to take with Entity Framework. There are several possibilities for how the new application that you're working on is going to relate to the existing database. Generally though, they fall into two categories. The first is that the database will drive changes to the application. This is called database fist. The second is that the application will drive changes to the database. And this is called code first. When you choose database first, you'll re-scaffold the database models an necessary. This means that you can't modify the generated files. When you need to make a change to the database, you will alter the database directly. For instance, with a script or with SQL Server Management Studio. You also run the risk of a change to your database outside of your application, such as a new required column, causing the application to fail when a write is made to that table. In code first, you'll change…

Contents