Exemplo n.º 1
0
        public async Task <string> BulkWriteAsync(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = await api.BulkWriteAsync();

            return("Request Count: " + result.RequestCount);
        }
Exemplo n.º 2
0
        public string BulkWrite(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.BulkWrite();

            return("Request Count: " + result.RequestCount);
        }
Exemplo n.º 3
0
        public string Count(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.Count();

            return("Count: " + result);
        }
Exemplo n.º 4
0
        public async Task <string> FindOneAndUpdateAsync(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var entity = await api.FindOneAndUpdateAsync();

            return("Entity Name: " + (entity == null ? "null entity" : entity.Name));
        }
Exemplo n.º 5
0
        public string CreateMany(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.CreateMany();

            return("Index Count: " + result);
        }
        public async Task <string> ExecuteModelAsync(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = await api.ExecuteModelAsync();

            return("Record Count: " + result);
        }
Exemplo n.º 7
0
        public async Task <string> MoveNextAsync(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = await api.GetNextBatchAsync();

            return("Any: " + result);
        }
Exemplo n.º 8
0
        public string ReplaceOne(string dbName)
        {
            var api = new MongoDB2_6Api(dbName);

            api.ReplaceOne();
            return("ReplaceOne Called");
        }
Exemplo n.º 9
0
        public async Task <string> ListAsync(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = await api.ListAsync();

            return("Index Count: " + result);
        }
        public string ExecuteModel(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.ExecuteModel();

            return("Record Count: " + result);
        }
        public async Task <string> UpdateOneAsync(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = await api.UpdateOneAsync();

            return("Modified Count: " + result.ModifiedCount);
        }
        public async Task <string> DeleteOneAsync(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = await api.DeleteOneAsync();

            return("Deleted Count: " + result.DeletedCount);
        }
Exemplo n.º 13
0
        public string RunCommand(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.RunCommand();

            return("Command: " + result);
        }
        public async Task <string> InsertOneAsync(string dbName)
        {
            var api = new MongoDB2_6Api(dbName);
            await api.InsertOneAsync();

            return("InsertOneAsync Called");
        }
Exemplo n.º 15
0
        public string RenameCollection(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.RenameCollection();

            return("Collection Name: " + result);
        }
Exemplo n.º 16
0
        public async Task <string> RenameCollectionAsync(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = await api.RenameCollectionAsync();

            return("Collection Name: " + result);
        }
Exemplo n.º 17
0
        public string ListCollections(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.ListCollections();

            return("Collection Count: " + result);
        }
Exemplo n.º 18
0
        public async Task <string> WatchAsync(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = await api.WatchAsync();

            return(result);
        }
Exemplo n.º 19
0
        public string Watch(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.Watch();

            return(result);
        }
Exemplo n.º 20
0
        public async Task <string> ReplaceOneAsync(string dbName)
        {
            var api = new MongoDB2_6Api(dbName);
            await api.ReplaceOneAsync();

            return("ReplaceOneAsync Called");
        }
Exemplo n.º 21
0
        public async Task <string> RunCommandAsync(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = await api.RunCommandAsync();

            return("Command: " + result);
        }
        public string InsertOne(string dbName)
        {
            var api = new MongoDB2_6Api(dbName);

            api.InsertOne();
            return("InsertOne Called");
        }
Exemplo n.º 23
0
        public string FindOneAndUpdate(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var entity = api.FindOneAndUpdate();

            return("Entity Name: " + (entity == null ? "null entity" : entity.Name));
        }
        public string UpdateOne(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.UpdateOne();

            return("Modified Count: " + result.ModifiedCount);
        }
Exemplo n.º 25
0
        public string List(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.List();

            return("Index Count: " + result);
        }
        public string DeleteOne(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.DeleteOne();

            return("Deleted Count: " + result.DeletedCount);
        }
Exemplo n.º 27
0
        public string MoveNext(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.GetNextBatch();

            return("Record Count: " + result);
        }
Exemplo n.º 28
0
        public string FindSync(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var cursor = api.FindSync();
            var name   = cursor.Any() ? cursor.First <CustomMongoDB2_6Entity>().Name : "none";

            return("Entity Name: " + name);
        }
Exemplo n.º 29
0
        public string MapReduce(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = api.MapReduce();

            var json = result.Any() ? result.First().ToJson() : "none";

            return("Result: " + json);
        }
Exemplo n.º 30
0
        public async Task <string> MapReduceAsync(string dbName)
        {
            var api    = new MongoDB2_6Api(dbName);
            var result = await api.MapReduceAsync();

            var json = result.Any() ? result.First().ToJson() : "none";

            return("Result: " + json);
        }