Exploring Entity Framework Part 3: The Database First Approach
NOTE: This post is part of a series on Entity Framework 6. To help cut back on overlapping content, this post will not cover any concepts that were previously discussed earlier in the series. If you have not read my previous two posts, you can access them from the links below: Exploring Entity Framework Part 1: A Brief Overview Exploring Entity Framework Part 2: The Code First Approach Welcome back again to my series on Entity Framework! In my last post, I covered how to make use of the Code First Approach, which is widely preferred by developers who will need to create their own databases from scratch and manage them through the application. I also covered how to use the Code First Approach with an existing database. While it is possible to implement Code First with a database that will be managed by your DBA, it does have its limitations. For example, if a DBA were to make a change to a table your application used, you would need to manually code the adjustment in the corresponding model of your application. Depending on how many changes were made, this could be a time consuming process. However, there is an easier way to manage our application with minimal intervention (which I will discuss later). Below are the topics I will be covering:
- Connecting to an existing database and generating models using the Database First Approach.
- Updating our models after changes to the database are made.
- Customizing our models using partial classes.