PoweredSoft.ObjectStorage.MongoDB by David Lebee

<PackageReference Include="PoweredSoft.ObjectStorage.MongoDB" Version="1.1.0" />

 MongoObjectStorageCollection<TEntity>

public class MongoObjectStorageCollection<TEntity> : IObjectStorageCollection<TEntity>
public IMongoCollection<TEntity> Collection { get; }

public string CollectionName { get; }

public MongoObjectStorageCollection(IMongoCollection<TEntity> collection)

public Task<TEntity> AddAsync(TEntity entity, CancellationToken cancellationToken = default)

public IQueryable<TEntity> AsQueryable()

protected virtual Expression<Func<TEntity, bool>> CreateEntityExpression(TEntity entity)

public Task DeleteAsync(TEntity entity, CancellationToken cancellationToken = default)

public Task<List<TEntity>> GetAllAsync(CancellationToken cancellationToken = default)

public Task<List<TEntity>> GetAllAsync(Expression<Func<TEntity, bool>> predicate, CancellationToken cancellationToken = default)

public Task<TEntity> GetAsync(object key, CancellationToken cancellationToken = default)

protected virtual PropertyInfo GetBsonIdProperty()

public Task<TEntity> UpdateAsync(TEntity entity, CancellationToken cancellationToken = default)