Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public async Task Create(SpiritDispenserSetting spiritDispenserSetting)
 {
     await _context.SpiritDispenserSettings.InsertOneAsync(spiritDispenserSetting);
 }