コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        public void Add(ConnectionMongoDB connection, SubscribeUser user)
        {
            IMongoCollection <SubscribeUser> collection = connection.DB.GetCollection <SubscribeUser>(collectionName);

            collection.InsertOne(user);
        }
コード例 #4
0
 public SubscribeUsers(ISubscribeContex _contex)
 {
     contex     = _contex;
     connection = new ConnectionMongoDB(connectionDB, dbName);
 }
コード例 #5
0
ファイル: Watches.cs プロジェクト: Voh4a/Web_SingPage_Watch
 public Watches(IWatchContex _contex)
 {
     contex     = _contex;
     connection = new ConnectionMongoDB(connectionDB, dbName);
 }