12 Saving data with Entity Framework Core

This chapter includes

  • What Entity Framework Core is and why you should use it
  • Adding Entity Framework Core to an ASP.NET Core application
  • Building a data model and using it to create a database
  • Querying, creating, and updating data using Entity Framework Core

Most applications that you’ll build with ASP.NET Core will require storing and loading some kind of data. Even the examples so far in this book have assumed you have some sort of data store—storing exchange rates, user shopping carts, or the locations of physical stores. I’ve glossed over this for the most part, but typically you’ll store this data in a database.

Working with databases can often be a rather cumbersome process. You have to manage ...

Get ASP.NET Core in Action, Second Edition 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.