Core.MongoDB.Repository
1.1.0
See the version list below for details.
dotnet add package Core.MongoDB.Repository --version 1.1.0
NuGet\Install-Package Core.MongoDB.Repository -Version 1.1.0
<PackageReference Include="Core.MongoDB.Repository" Version="1.1.0" />
paket add Core.MongoDB.Repository --version 1.1.0
#r "nuget: Core.MongoDB.Repository, 1.1.0"
// Install Core.MongoDB.Repository as a Cake Addin #addin nuget:?package=Core.MongoDB.Repository&version=1.1.0 // Install Core.MongoDB.Repository as a Cake Tool #tool nuget:?package=Core.MongoDB.Repository&version=1.1.0
Example for Net core 2.1 https://github.com/Luminos-media/ExRepository
Howto connect.
Cosmos mongoDb. Setup StartUp.cs services.AddMongoRepositories(c ⇒ { c.Host = Configuration.GetSection("CosmosConnection:host").Value; c.UserName = Configuration.GetSection("CosmosConnection:username").Value; c.Password = Configuration.GetSection("CosmosConnection:password").Value; c.DbName = Configuration.GetSection("CosmosConnection:database").Value; });
If you want to connect with MongoDb Url Setup.cs.
services.AddMongoRepositories(x =>
{
x.MongoUrl = Configuration.GetSection("CosmosConnection:MongoUrl").Value;
x.DbName = Configuration.GetSection("CosmosConnection:database").Value;
});
-How to create data models entity public class MockModels : MongoEntity { public string Name { get; set; } public string LastName { get; set; } public DateTime CreateOn { get; set; } }
-How To create base Interface class repository public interface IMockRepository: IMongoRepository<MockModels> { }
-How to Create base class repository public class MockRepository: MongoRepository<MockModels>,IMockRepository { public MockRepository(IMongoContext mongoContext) : base(mongoContext) { } }
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
.NET Core | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 2.1
- Microsoft.Extensions.Configuration.Abstractions (>= 2.1.0)
- Microsoft.Extensions.Configuration.Binder (>= 2.1.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 2.1.1)
- Microsoft.Extensions.Options (>= 2.1.1)
- MongoDB.Driver (>= 2.6.1)
- MongoDB.Driver.GridFS (>= 2.6.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.