private static void TestCsharpMongo() { var testDb = new MongoDabase("test"); // add testDb.CollectionName <MongoTestCollection>().Insert(new MongoTestCollection { Name = Guid.NewGuid().ToString(), Age = 1 }); // get all var result = testDb.CollectionName <MongoTestCollection>().FindAll(); result.FirstOrDefault().Age = 100; // count testDb.CollectionName <MongoTestCollection>().Count(); // delete testDb.CollectionName <MongoTestCollection>().Delete(x => x.Age == 1); }
private static void TestCsharpMongo() { var testDb = new MongoDabase("test"); // add testDb.CollectionName<MongoTestCollection>().Insert(new MongoTestCollection { Name = Guid.NewGuid().ToString(), Age = 1 }); // get all var result = testDb.CollectionName<MongoTestCollection>().FindAll(); result.FirstOrDefault().Age = 100; // count testDb.CollectionName<MongoTestCollection>().Count(); // delete testDb.CollectionName<MongoTestCollection>().Delete(x => x.Age == 1); }
public void TestMethod1() { MongoDabase net = new MongoDabase(""); var x = net.CollectionName <TestClass>("TestClass"); }
public void TestMethod1() { MongoDabase net = new MongoDabase(""); var x = net.CollectionName<TestClass>("TestClass"); }