public HttpResponseMessage UpdateSupplier(int id, [FromBody] SupplierDto supplier) { supplier.Id = id; _service.UpdateSupplier(supplier); _service.ApplyChanges(); return(Request.CreateResponse(HttpStatusCode.OK, $"Suppliers updated{supplier.Name}")); }
public IHttpActionResult Update([FromBody] SupplierView product) { var supplierDTO = mapper.Map <SupplierView, SupplierDTO>(product); suppliersService.UpdateSupplier(supplierDTO); suppliersService.SaveChanges(); return(Ok()); }
/// <summary> /// Оновлює постачальника /// </summary> /// <param name="supplierDto">Екземпляр постачальника</param> public void UpdateSupplier(SuppliersDtoModel supplierDto) => suppliersService.UpdateSupplier(supplierDto);