public IActionResult Update(int id, [FromBody] Covers item) { // map dto to entity and set id item.Id = id; try { // save //item.FUpdUserId = GetNameClaim(); item.UpdatedAt = DateTime.Now; item = _itemService.Update(item); return(Ok(item)); } catch (AppException ex) { // return error message if there was an exception return(DefaultError(ex.Message)); } }