Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 private void SetupPlantCollection()
 {
     mongoClient      = user.GetMongoClient("mongodb-atlas");
     dbPlantInventory = mongoClient.GetDatabase("inventory");
     plantsCollection = dbPlantInventory.GetCollection <Plant>("plants");
 }