예제 #1
0
        public AccountsController(IMongoClient client, ILogger <AccountsController> logger, EncryptionAndCompressService encrypt)
        {
            encryptionService = encrypt;
            _logger           = logger;
            var database = client.GetDatabase("TodoDb");

            accounts = database.GetCollection <Account>("accounts");
        }
예제 #2
0
        public AccountsController(IMongoClient client, MemoryDataAndEmailService data, EncryptionAndCompressService encrypt)
        {
            var database = client.GetDatabase("ChatAppManagement");

            memoryService  = data;
            encryptService = encrypt;
            accounts       = database.GetCollection <Account>("accounts");
        }
예제 #3
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");
        }
 public AccountsController(AppDbContext context, EncryptionAndCompressService encrypt)
 {
     dbContext         = context;
     encryptionService = encrypt;
 }