5 Using Entity Framework Core with relational databases

 

This chapter covers

  • Building your first Entity Framework Core application
  • Accessing data asynchronously
  • Using Entity Framework Core with ASP.NET Core
  • Exposing your API via Swagger/OpenAPI

Many applications need to record data to some permanent store so it can be retrieved later, such as when you save a document in Microsoft Word or save to a slot in your favorite game. The state of the document or game can be written to the local filesystem or to cloud-based storage. A file or network stream works well when data can be read sequentially or the data and its relationships are easy to store in memory. When data is too big or complex, such as the catalog of items in a retail store or the list of users and permissions in an identity provider, a more advanced storage system is needed.

5.1 Storing application data

5.2 Building your first EF Core application

5.2.1 Object-creation shorthand

5.2.2 Cleaning up the compiler warnings

5.2.3 Creating a relationship

5.3 Accessing data asynchronously

5.4 Using EF Core with ASP.NET Core

5.4.1 Request methods

5.5 Exposing your API via Swagger/OpenAPI

Summary