예제 #1
0
        public async Task <bool> Update(SpiritDispenserSetting spiritDispenserSetting)
        {
            ReplaceOneResult updateResult =
                await _context
                .SpiritDispenserSettings
                .ReplaceOneAsync(
                    filter : g => g.Name == spiritDispenserSetting.Name,
                    replacement : spiritDispenserSetting);

            return(updateResult.IsAcknowledged &&
                   updateResult.ModifiedCount > 0);
        }
예제 #2
0
 public async Task Create(SpiritDispenserSetting spiritDispenserSetting)
 {
     await _context.SpiritDispenserSettings.InsertOneAsync(spiritDispenserSetting);
 }