Summary
In this chapter, you have learned how to use Entity Framework Core 2 together with ASP.NET Core 2.0 for working with SQL Server databases.
We have seen how to use a Db Context and connection string to connect to an SQL Server database. We have then updated the models in the Tic-Tac-Toe application with primary and foreign key definitions by using Entity Framework Core 2 Data Annotations, as well as overriding the OnModelCreating
method within the Db Context.
You have worked with Entity Framework Core 2 Migrations to be able to constantly keep your models in your code consistent with their corresponding database representations.
Furthermore, you have learnt how to insert, update and query data in an easy, productive and efficient way.
In the next chapter, we will talk about how to secure access to your ASP.NET Core 2.0 applications by using the integrated ASP.NET Core 2.0 authorization features.