1. Project Overview & Quickstart (dotnet/efcore)
Repository
This repository is home to the following .NET Foundation projects. These projects are maintained by Microsoft and licensed under the MIT License.
Entity Framework Core
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.CosmosUse 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
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.SqliteUse 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
- Documentation
- Roadmap
- Weekly status updates
- Release planning process
- How to write an EF Core provider
- Security
- Code of conduct
2. Official Technical Reference & Guides (dotnet/docs)
.NET Docs
This repository contains the conceptual documentation for .NET. The .NET documentation site is built from multiple repositories:
- .NET docs
- ASP.NET Core docs
- .NET Desktop workloads docs
- .NET MAUI docs
- Entity Framework docs
- Community toolkit
API reference documentation is published from the following repositories:
- .NET API reference
- .NET MAUI API reference
- Android API reference
- Entity Framework 6/Core API reference
- Roslyn API reference
- Community toolkit API reference
These API reference doc repositories are public. Only some accept issues and pull requests. Others are pass-through repositories because API reference is generated directly from the /// in the product source. Some folders in dotnet-api-docs use the product repository as the source of truth.
The C# language specification documentation comes from the following two repositories:
Our team's tasks are tracked in our project boards. You'll see monthly sprint projects, along with long-running projects for major documentation updates. The projects contain documentation issues across the repositories that build .NET docs. Issues are tracked in the relevant repositories. We have a large community using these resources. We make our best effort to respond to issues in a timely fashion. To create a new issue, click the "Open a documentation issue" button at the bottom of any of our published docs, or choose one of the available templates. The control at the bottom of each article automatically routes you to the correct repo and fills in some relevant information based on the article.
:purple_heart: Contribute
We welcome contributions to help us improve and complete the .NET docs. This is a very large repo, covering a large area. If this is your first visit, see the Contributor guide for information on working with us. Look for issues labeled help wanted :label: for ideas to get started.
Before submitting a PR with 3rd party dependencies, see our policy on 3rd party dependencies.
We work to merge or close PRs in a timely fashion. We regularly review and approve PRs. We encourage contributors to respond to comments in a similar timely fashion. Many times, reviews identify small changes such as spelling or grammar issues, or word choice. Maintainers can accept those suggestions and merge the PR. In other situations, maintainers ask for more significant changes before a PR is ready to merge. We expect contributors to make those changes. Maintainers will help by answering questions or pointing to other resources, if needed.
We consider PRs to be abandoned when they've had no activity (either commits or discussion) in the past 30 days. Team members will close PRs that have been abandoned. Contributors can reopen and continue to work.
:bookmark_tabs: Code of conduct
This project has adopted the code of conduct defined by the Contributor Covenant
to clarify expected behavior in our community. For more information, see the .NET Foundation: Code of Conduct.
:octocat: GitHub Action workflows
- : Adds a comment to PRs that were not automated, but rather manually created that target the
livebranch. - : Automatically approves and auto-merges PRs originating from the
dependabbot[bot]. - : Creates a PR to generate the "What's new" article on the first of every month.
- : The current status for the entire repositories Markdown linter status.
- : Runs various Markdown verifications, beyond the linter, such as ensuring links and redirects are valid.
- : Builds the site for the PR in context, and verifies the build reporting either,
success,warnings, orerror. - : Custom .NET build validation, locates code impacted by a PR, and builds.
- : Runs monthly, creating issues on projects that target .NET versions that are out of support.
- : Automatically updates the
dependabotconfiguration weekly, but only if required. - : Automatically synchronizes issues with Quest (Azure DevOps).
- : Manual bulk import of issues into Quest (Azure DevOps).