public MongoDbRepository(IMongoDbContext mongoDbContext) { Check.ArgumentNotNull(mongoDbContext); _mongoDbContext = mongoDbContext; Collection = _mongoDbContext.Collection <TEntity>(); Client = mongoDbContext.Client; }
public MongoDbRepository(IMongoDbContext mongoDbContext) { _collection = mongoDbContext.Collection <TEntity>(); }
public MongoDbRepository(IMongoDbContext dbContext) { _collection = dbContext.Collection <T>(); _query = dbContext.Queryable <T>(); }
public async Task <IEnumerable <T> > GetAllDocuments() { return(await _context.Collection <T>() .Find(_ => true) .ToListAsync()); }