public void CreateItem(Message item) { if (item != null) { item.On = DateTime.Now; } MongoDBStorage <Message> .CreateItem(_collection, item); }
public async Task SetUpAsync() { _storage = MongoDBStorageFactory.DefaultInstance; await _storage.Revisions.Database.Client.DropDatabaseAsync( _storage.Revisions.Database.DatabaseNamespace.DatabaseName); await _storage.SetUp(); }
public async Task SetUpAsync() { _storage = MongoDBStorageFactory.DefaultInstance; await _storage.Revisions.Database.Client.DropDatabaseAsync( _storage.Revisions.Database.DatabaseNamespace.DatabaseName); await _storage.SetUp(); }
public async Task <IEnumerable <User> > GetAllItemsAsync() { return(await MongoDBStorage <User> .GetAllItemsAsync(_collection)); }
public void CreateItem(User item) { MongoDBStorage <User> .CreateItem(_collection, item); }
public void UpdateItem(Expression <Func <Catalogues, bool> > predicate, Catalogues item) { MongoDBStorage <Catalogues> .UpdateItem(_collection, predicate, item); }
public async Task <Catalogues> GetItemAsync(Expression <Func <Catalogues, bool> > predicate) { return(await MongoDBStorage <Catalogues> .GetItemAsync(_collection, predicate)); }
public void CreateItem(Catalogues item) { MongoDBStorage <Catalogues> .CreateItem(_collection, item); }
public RepositoryBase(IOptions <AppConfig> appConfigs) { MongoHelper.SetDatabaseDetailsFromConfig(appConfigs); MongoDBStorage <T> .Initialize(); }
static BasicAuthenticationAttribute() { _storage = MongoDBStorageFactory.DefaultInstance; }
public async Task <bool> RemoveItemAsync(Expression <Func <Message, bool> > predicate) { return(await MongoDBStorage <Message> .DeleteAsync(_collection, predicate)); }
public void UpdateItem(Expression <Func <Message, bool> > predicate, Message item) { MongoDBStorage <Message> .UpdateItem(_collection, predicate, item); }
public async Task <IEnumerable <Message> > GetItemsAsync(Expression <Func <Message, bool> > predicate) { return(await MongoDBStorage <Message> .GetItemsAsync(_collection, predicate)); }
public CounterController(MongoDBStorage mongoDbStorage) { _storage = mongoDbStorage; }
public async Task <User> GetItemAsync(Expression <Func <User, bool> > predicate) { return(await MongoDBStorage <User> .GetItemAsync(_collection, predicate)); }
static BasicAuthenticationAttribute() { _storage = new MongoDBStorage(); }
public void UpdateItem(Expression <Func <User, bool> > predicate, User item) { MongoDBStorage <User> .UpdateItem(_collection, predicate, item); }
static CounterController() { _storage = new MongoDBStorage(); }