public ResponseUpdateWorkprice UpdateWorkprice(int id, RequestUpdateWorkprice request) { var workpriceItem = dbManager.GetWorkpriceById(id); if (workpriceItem == null) { throw new Exception("Не найдена работа в БД"); } workpriceItem.ContactPrice = request.ContactPrice; workpriceItem.ExactPrice = request.ExactPrice; workpriceItem.Name = request.Name; workpriceItem.Price = request.Price; workpriceItem.Unity = request.Unity; dbManager.UpdateWorkprice(workpriceItem); return(new ResponseUpdateWorkprice()); }
public ResponseUpdateWorkprice UpdateWorkprice(int id, [FromBody] RequestUpdateWorkprice request) { return(ExecuteWrapper.Execute(() => { return aManager.UpdateWorkprice(id, request); })); }