YITC.DotNetCore.MongoDB
16.30.0.4
dotnet add package YITC.DotNetCore.MongoDB --version 16.30.0.4
NuGet\Install-Package YITC.DotNetCore.MongoDB -Version 16.30.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YITC.DotNetCore.MongoDB" Version="16.30.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add YITC.DotNetCore.MongoDB --version 16.30.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: YITC.DotNetCore.MongoDB, 16.30.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install YITC.DotNetCore.MongoDB as a Cake Addin #addin nuget:?package=YITC.DotNetCore.MongoDB&version=16.30.0.4 // Install YITC.DotNetCore.MongoDB as a Cake Tool #tool nuget:?package=YITC.DotNetCore.MongoDB&version=16.30.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DotNetCore.MongoDB
Context
IMongoContext
public interface IMongoContext
{
IMongoDatabase Database { get; }
}
MongoContext
public abstract class MongoContext : IMongoContext
{
public MongoContext(string connectionString) { }
public IMongoDatabase Database { get; }
}
Document
IDocument
public interface IDocument
{
ObjectId Id { get; set; }
}
Document
public abstract class Document : IDocument
{
[BsonExtraElements]
public BsonDocument ExtraElements { get; set; }
public ObjectId Id { get; set; }
}
MongoCommandRepository
public class MongoCommandRepository<T> : ICommandRepository<T> where T : class
{
public MongoCommandRepository(IMongoContext context) { }
public void Add(T item) { }
public Task AddAsync(T item) { }
public void AddRange(IEnumerable<T> items) { }
public Task AddRangeAsync(IEnumerable<T> items) { }
public void Delete(object key) { }
public void Delete(Expression<Func<T, bool>> where) { }
public Task DeleteAsync(object key) { }
public Task DeleteAsync(Expression<Func<T, bool>> where) { }
public void Update(T item) { }
public Task UpdateAsync(T item) { }
public void UpdatePartial(object item) { }
public Task UpdatePartialAsync(object item) { }
public void UpdateRange(IEnumerable<T> items) { }
public Task UpdateRangeAsync(IEnumerable<T> items) { }
}
MongoQueryRepository
public class MongoQueryRepository<T> : IQueryRepository<T> where T : class
{
public MongoQueryRepository(IMongoContext context) { }
public IQueryable<T> Queryable { get; };
public bool Any() { }
public bool Any(Expression<Func<T, bool>> where) { }
public Task<bool> AnyAsync() { }
public Task<bool> AnyAsync(Expression<Func<T, bool>> where) { }
public long Count() { }
public long Count(Expression<Func<T, bool>> where) { }
public Task<long> CountAsync() { }
public Task<long> CountAsync(Expression<Func<T, bool>> where) { }
public T Get(object key) { }
public Task<T> GetAsync(object key) { }
public IEnumerable<T> List() { }
public async Task<IEnumerable<T>> ListAsync() { }
}
MongoRepository
public class MongoRepository<T> : Repository<T> where T : class
{
public MongoRepository(IMongoContext context) : base(new MongoCommandRepository<T>(context), new MongoQueryRepository<T>(context)) { }
}
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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- MongoDB.Driver (>= 2.15.0)
- YITC.DotNetCore.Repositories (>= 16.30.0.4)
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 |
---|---|---|
16.30.0.4 | 488 | 4/15/2022 |
16.26.0.3 | 421 | 3/17/2022 |
16.26.0.2-yitc | 177 | 3/16/2022 |
16.26.0 | 406 | 3/16/2022 |
16.26.0-yitc | 160 | 3/16/2022 |