Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

dotnet/efcore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build statustest results

This repository is home to the following.NET Foundation projects. These projects are maintained byMicrosoft and licensed under theMIT License.

EF Entity Framework Core

latest versionpreview versiondownloads

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 onNuGet. Install the provider package corresponding to your target database. See thelist of providers in the docs for additional databases.

dotnet add package Microsoft.EntityFrameworkCore.SqlServerdotnet add package Microsoft.EntityFrameworkCore.Sqlitedotnet add package Microsoft.EntityFrameworkCore.Cosmos

Use the--version option to specify apreview version to install.

Daily builds

We recommend using thedaily 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 theDbContext, defining the model, and creating the database, seegetting started in the docs.

usingvardb=newBloggingContext();// Inserting data into the databasedb.Add(newBlog{Url="http://blogs.msdn.com/adonet"});db.SaveChanges();// Queryingvarblog=db.Blogs.OrderBy(b=>b.BlogId).First();// Updatingblog.Url="https://devblogs.microsoft.com/dotnet";blog.Posts.Add(newPost{Title="Hello World",Content="I wrote an app using EF Core!"});db.SaveChanges();// Deletingdb.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. SeeHow to contribute for more information.

Getting support

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

Microsoft.Data.Sqlite

latest versionpreview versiondownloads

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 onNuGet.

dotnet add package Microsoft.Data.Sqlite

Use the--version option to specify apreview version to install.

Daily builds

We recommend using thedaily 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 commonADO.NET abstractions for connections, commands, data readers, and so on. For more information, seeMicrosoft.Data.Sqlite on Microsoft Docs.

usingvarconnection=newSqliteConnection("Data Source=Blogs.db");connection.Open();usingvarcommand=connection.CreateCommand();command.CommandText="SELECT Url FROM Blogs";usingvarreader=command.ExecuteReader();while(reader.Read()){varurl=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. SeeHow to contribute for more information.

Getting support

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

See also


[8]ページ先頭

©2009-2025 Movatter.jp