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}"));
 }
예제 #2
0
        public IHttpActionResult Update([FromBody] SupplierView product)
        {
            var supplierDTO = mapper.Map <SupplierView, SupplierDTO>(product);

            suppliersService.UpdateSupplier(supplierDTO);

            suppliersService.SaveChanges();

            return(Ok());
        }
예제 #3
0
 /// <summary>
 /// Оновлює постачальника
 /// </summary>
 /// <param name="supplierDto">Екземпляр постачальника</param>
 public void UpdateSupplier(SuppliersDtoModel supplierDto) => suppliersService.UpdateSupplier(supplierDto);