public IEnumerable <Watch> GetSomeData(ConnectionMongoDB connection, int skip, int limit) { IMongoCollection <Watch> collection = connection.DB.GetCollection <Watch>(collectionName); var filter = new BsonDocument(); var watches = collection.Find(filter).Skip(skip).Limit(limit).ToList(); return(watches); }
public IEnumerable <Watch> GetData(ConnectionMongoDB connection) { IMongoCollection <Watch> collection = connection.DB.GetCollection <Watch>(collectionName); var filter = new BsonDocument(); var watches = collection.Find(filter).ToList(); return(watches); }
public void Add(ConnectionMongoDB connection, SubscribeUser user) { IMongoCollection <SubscribeUser> collection = connection.DB.GetCollection <SubscribeUser>(collectionName); collection.InsertOne(user); }
public SubscribeUsers(ISubscribeContex _contex) { contex = _contex; connection = new ConnectionMongoDB(connectionDB, dbName); }
public Watches(IWatchContex _contex) { contex = _contex; connection = new ConnectionMongoDB(connectionDB, dbName); }