public async Task <Value> Update(KeyEnum valueId, ValueInput value) { var entity = await this.Entity(valueId); if (entity != null) { mapper.MapValue(value, entity); await SaveChanges(); return(mapper.MapValue(entity, new Value())); } throw new KeyNotFoundException($"Cannot find value {valueId.ToString()}"); }