public async Task <IActionResult> UpdateLayerAsync([FromBody] EditAssetConditionLayerModel model) { if (!ModelState.IsValid) { return(BadRequest(ErrorResponse.Create(ModelState))); } var layer = await _assetConditionService.GetLayerAsync(model.Id); if (layer == null) { return(NotFound(ErrorResponse.Create($"Layer with id='{model.Id}' not found"))); } layer = Mapper.Map <AssetConditionLayer>(model); await _assetConditionService.UpdateLayerAsync(layer); return(NoContent()); }