Summary

Storing and retrieving data is an essential part of most web applications, and you can choose all kinds of databases to work with. EF Core is an O/RM that lets you write classes and LINQ queries, and those will be mapped to the database tables and to SQL statements without you needing to leave the comfort of the C# language. In this chapter, I explained how to work with EF Core and how you can use the DbContext base class to create a bridge between your classes, the database, and the conventional mapping it uses. You've seen how to store data and how to retrieve it with various LINQ operators. You also added automatic migrations to your application, which allows the database to be created and migrated to newer versions automatically ...

Get Hands-On Full-Stack Web Development with ASP.NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.