Ejemplo n.º 1
0
        public AccountsController(IMongoClient client, MemoryDataAndEmailService data, EncryptionAndCompressService encrypt)
        {
            var database = client.GetDatabase("ChatAppManagement");

            memoryService  = data;
            encryptService = encrypt;
            accounts       = database.GetCollection <Account>("accounts");
        }
Ejemplo n.º 2
0
        public postsController(IMongoClient client, EncryptionAndCompressService encrypt, MemoryDataAndEmailService memoryService)
        {
            encryptService     = encrypt;
            this.memoryService = memoryService;
            var database = client.GetDatabase("SocialMediaManagement");

            accounts = database.GetCollection <Account>("accounts");
            posts    = database.GetCollection <Post>("posts");
            walls    = client.GetDatabase("Walls");
        }