Voltar ao ranking

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.

entity-frameworkdatabasec-sharpdotnet-coredotnet-standarddotnet-frameworkormaspnet-producthacktoberfest
Crescimento de estrelas
Estrelas
14.7k
Forks
3.4k
Crescimento semanal
Issues
2.3k
5k10k
mai. de 2014mai. de 2018jun. de 2022jul. de 2026
README

Repository

build status test results

This repository is home to the following .NET Foundation projects. These projects are maintained by Microsoft and licensed under the MIT License.

EF Entity Framework Core

latest version preview version downloads

EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations. EF Core works with SQL Server, Azure SQL Database, SQLite, Azure Cosmos DB, MariaDB, MySQL, PostgreSQL, and other databases through a provider plugin API.

Installation

EF Core is available on NuGet. Install the provider package corresponding to your target database. See the list of providers in the docs for additional databases.

dotnet add package Microsoft.EntityFrameworkCore.SqlServer
dotnet add package Microsoft.EntityFrameworkCore.Sqlite
dotnet add package Microsoft.EntityFrameworkCore.Cosmos

Use the --version option to specify a preview version to install.

Daily builds

We recommend using the daily builds to get the latest code and provide feedback on EF Core. These builds contain latest features and bug fixes; previews and official releases lag significantly behind.

Basic usage

The following code demonstrates basic usage of EF Core. For a full tutorial configuring the DbContext, defining the model, and creating the database, see getting started in the docs.

using var db = new BloggingContext();

// Inserting data into the database
db.Add(new Blog { Url = "http://blogs.msdn.com/adonet" });
db.SaveChanges();

// Querying
var blog = db.Blogs
    .OrderBy(b => b.BlogId)
    .First();

// Updating
blog.Url = "https://devblogs.microsoft.com/dotnet";
blog.Posts.Add(
    new Post
    {
        Title = "Hello World",
        Content = "I wrote an app using EF Core!"
    });
db.SaveChanges();

// Deleting
db.Remove(blog);
db.SaveChanges();

Build from source

Most people use EF Core by installing pre-built NuGet packages, as shown above. Alternatively, the code can be built and packages can be created directly on your development machine.

Contributing

We welcome community pull requests for bug fixes, enhancements, and documentation. See How to contribute for more information.

Getting support

If you have a specific question about using these projects, we encourage you to ask it on Stack Overflow. If you encounter a bug or would like to request a feature, submit an issue. For more details, see getting support.

Microsoft.Data.Sqlite

latest version preview version downloads

Microsoft.Data.Sqlite is a lightweight ADO.NET provider for SQLite. The EF Core provider for SQLite is built on top of this library. However, it can also be used independently or with other data access libraries.

Installation

The latest stable version is available on NuGet.

dotnet add package Microsoft.Data.Sqlite

Use the --version option to specify a preview version to install.

Daily builds

We recommend using the daily builds to get the latest code and provide feedback on Microsoft.Data.Sqlite. These builds contain the latest features and bug fixes; previews and official releases lag significantly behind.

Basic usage

This library implements the common ADO.NET abstractions for connections, commands, data readers, and so on. For more information, see Microsoft.Data.Sqlite on Microsoft Docs.

using var connection = new SqliteConnection("Data Source=Blogs.db");
connection.Open();

using var command = connection.CreateCommand();
command.CommandText = "SELECT Url FROM Blogs";

using var reader = command.ExecuteReader();
while (reader.Read())
{
    var url = reader.GetString(0);
}

Build from source

Most people use Microsoft.Data.Sqlite by installing pre-built NuGet packages, as shown above. Alternatively, the code can be built and packages can be created directly on your development machine.

Contributing

We welcome community pull requests for bug fixes, enhancements, and documentation. See How to contribute for more information.

Getting support

If you have a specific question about using these projects, we encourage you to ask it on Stack Overflow. If you encounter a bug or would like to request a feature, submit an issue. For more details, see getting support.

See also

Repositórios relacionados
jasontaylordev/CleanArchitecture

Clean Architecture Solution Template for ASP.NET Core

C#MIT Licenseclean-architecturetemplate
cleanarchitecture.jasontaylor.dev
20.3k4.2k
ent/ent

An entity framework for Go

GoGo ModulesApache License 2.0entorm
entgo.io
17.1k1k
SanderMertens/flecs

A fast entity component system (ECS) for C & C++

COtherecsc99
flecs.dev
8.5k607
kgrzybek/sample-dotnet-core-cqrs-api

Sample .NET Core REST API CQRS implementation with raw SQL and DDD using Clean Architecture.

C#MIT Licensedddddd-example
kamilgrzybek.com/design/simple-cqrs-implementation-with-raw-sql-and-ddd/
3.1k676
PomeloFoundation/Pomelo.EntityFrameworkCore.MySql

Entity Framework Core provider for MySQL and MariaDB built on top of MySqlConnector

C#MIT Licenseentity-frameworkdotnet
3k415
xiaonanln/goworld

Scalable Distributed Game Server Engine with Hot Swapping in Golang

GoGo ModulesApache License 2.0golangrpc
2.7k476
thepirat000/Audit.NET

An extensible framework to audit executing operations in .NET

C#MIT Licenseaudit-logaudit
learnentityframeworkcore.com/extensions/audit-entityframework-core
2.6k328
ErikEJ/EFCorePowerTools

Entity Framework Core Power Tools - reverse engineering, migrations and model visualization in Visual Studio & CLI

C#MIT Licenseentity-framework-corevisual-studio
2.5k335
zzzprojects/EntityFramework-Plus

Entity Framework Plus extends your DbContext with must-haves features: Include Filter, Auditing, Caching, Query Future, Batch Delete, Batch Update, and more

C#MIT Licensecsharpdotnet
entityframework-plus.net
2.3k318
npgsql/efcore.pg

Entity Framework Core provider for PostgreSQL

C#PostgreSQL Licenseentity-frameworknpgsql
1.8k259
genaray/Arch

A high-performance C# based Archetype & Chunks Entity Component System (ECS) with optional multithreading.

C#Apache License 2.0csharpdotnet
arch-ecs.gitbook.io/arch
1.8k172
dotnet/EntityFramework.Docs

Documentation for Entity Framework Core and Entity Framework 6

MermaidCreative Commons Attribution 4.0 Internationaldocumentationorm
learn.microsoft.com/ef/
1.7k2k