DbContext

An ORM uses the code representation of a SQL schema to request databases. Originally, they mapped a relational database. Now there's a lot of wrapper to map an ORM, with a lot of different data sources, such as noSQL databases, key-value pairs or documents, redis, document DB, CSV files, and so on.

With Entity Framework, a class that inherits the DbContext class maps the SQL schema.

This DbContext contains DbSet objects that map with DB tables.

Get ASP.NET Core MVC 2.0 Cookbook 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.