public async Task Setup() { app = App.Create(myRealmAppId); user = await app.LogInAsync(Credentials.EmailPassword("*****@*****.**", "foobar")); config = new PartitionSyncConfiguration("myPart", user); // :code-block-start: mongo-setup mongoClient = user.GetMongoClient("mongodb-atlas"); dbPlantInventory = mongoClient.GetDatabase("inventory"); plantsCollection = dbPlantInventory.GetCollection <Plant>("plants"); // :code-block-end: await InsertsOne(); await InsertsMany(); return; }
private void SetupPlantCollection() { mongoClient = user.GetMongoClient("mongodb-atlas"); dbPlantInventory = mongoClient.GetDatabase("inventory"); plantsCollection = dbPlantInventory.GetCollection <Plant>("plants"); }