IoTSharp.EntityFrameworkCore.MongoDB
1.0.0
Requires NuGet 3.6 or higher.
dotnet add package IoTSharp.EntityFrameworkCore.MongoDB --version 1.0.0
NuGet\Install-Package IoTSharp.EntityFrameworkCore.MongoDB -Version 1.0.0
<PackageReference Include="IoTSharp.EntityFrameworkCore.MongoDB" Version="1.0.0" />
paket add IoTSharp.EntityFrameworkCore.MongoDB --version 1.0.0
#r "nuget: IoTSharp.EntityFrameworkCore.MongoDB, 1.0.0"
// Install IoTSharp.EntityFrameworkCore.MongoDB as a Cake Addin #addin nuget:?package=IoTSharp.EntityFrameworkCore.MongoDB&version=1.0.0 // Install IoTSharp.EntityFrameworkCore.MongoDB as a Cake Tool #tool nuget:?package=IoTSharp.EntityFrameworkCore.MongoDB&version=1.0.0
IoTSharp.EntityFrameworkCore.MongoDB
EFCore.MongoDB is a MongoDB mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations. EFCore.MongoDB works with MongoDB through a provider plugin API.
Installation
EFCore.MongoDB is available on NuGet.
dotnet add package IoTSharp.EntityFrameworkCore.MongoDB
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 EFCore.MongoDB . 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 EFCore.MongoDB by installing pre-build NuGet packages, as shown above. Alternately, 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
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- Microsoft.EntityFrameworkCore (>= 6.0.2)
- Microsoft.EntityFrameworkCore.Proxies (>= 6.0.2)
- MongoDB.Driver (>= 2.14.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 382 | 2/19/2022 |