Example #1
0
        public async Task <bool> Update(StatusLampSetting setting)
        {
            ReplaceOneResult updateResult =
                await _context
                .StatusLampSettings
                .ReplaceOneAsync(
                    filter : g => g.Name == setting.Name,
                    replacement : setting);

            return(updateResult.IsAcknowledged &&
                   updateResult.ModifiedCount > 0);
        }
Example #2
0
 public async Task Create(StatusLampSetting setting)
 {
     await _context.StatusLampSettings.InsertOneAsync(setting);
 }