Summary
We have learned how to leverage Entity Framework on an existing system that has a live database (for illustrative purposes, we have created SQL scripts to create and simulate an existing database). We have explored NuGet packages that expose the APIs required to reverse engineer the database (including database context and corresponding data models). Finally, we have consumed the existing database in our MVC application using the scaffolding tool (which was installed on the way), and have also seen the changes required to the auto-generated code (which were not covered in Chapter 1, Kickstart - Introduction to Entity Framework Core). The database-first approach was just a mechanism used for building existing systems (leveraging EF in the existing system). So far, we have used relationships (new or existing ones), but haven't figured out the relationships supported by Entity Framework. Let's explore them in Chapter 3, Relationships – Terminology and Conventions.