Entity Framework Core

Entity Framework Core (EF Core) is a modern object-relational mapper (ORM) for .NET. It enables .NET developers to work with a database using domain-specific objects that are generally entity framework concepts, and it minimizes the amount of data-access code that the developer needs to write. EF Core is a lightweight, extensible, and high-performance version of the popular Entity Framework. It is cross-platform and can be used with various .NET applications, including ASP.NET Core, Windows, macOS, and Linux.

Key Features

Getting Started

To get started with EF Core, you typically need to install the appropriate NuGet packages for your database provider.

dotnet add package Microsoft.EntityFrameworkCore.SqlServer

Then, you define your data model using C# classes and create a derived DbContext instance to represent a session with the database and allow you to query and save data.

Core Concepts

Common Scenarios

Explore the following resources for more in-depth information and tutorials.