MSDN Documentation

Entity Framework Core Overview

Entity Framework Core (EF Core) is a modern, cross-platform, open-source version of the popular Entity Framework data access technology. EF Core enables .NET developers to work with a database using domain-specific objects that are essentially .NET classes. This approach is known as the Object-Relational Mapper (ORM) pattern.

What is Entity Framework Core?

EF Core simplifies data access in .NET applications. It provides a set of APIs and tools that allow you to:

Key Features of EF Core

Core Concepts

Understanding these core concepts will help you get started with EF Core:

Example: A Simple Query

Here's a basic example of how to query data using EF Core:


using (var context = new BloggingContext())
{
    var blogs = context.Blogs
                       .Where(b => b.Rating > 3)
                       .OrderBy(b => b.Url)
                       .ToList();

    foreach (var blog in blogs)
    {
        Console.WriteLine($"Found blog: {blog.Url}");
    }
}
            

Next Steps

To dive deeper into EF Core, explore the following resources: