public Task CreateAsync(TelegramConfig config)
 {
     config.Id = ConfigId;
     return(Collection.ReplaceOneAsync(dbConfig => dbConfig.Id == ConfigId, config, new UpdateOptions {
         IsUpsert = true
     }));
 }
Example #2
0
        public void CreateConfiguration()
        {
            var config = new TelegramConfig
            {
                BotToken = null
            };

            Factory.Get <TelegramConfigurationDB>().CreateAsync(config).Wait();
        }