public async Task <IHttpActionResult> GetAsync(int id) { SuppliersDTM supplier = await service.GetByIdAsync(id); if (supplier == null) { return(NotFound()); } return(Ok()); }
public async Task <IHttpActionResult> GetProductsBySupplierIdAsync(int id) { SuppliersDTM supplier = await suppliersService.GetByIdAsync(id); if (supplier == null) { return(NotFound()); } IEnumerable <ProductsDTM> result = service.GetBySupplier(id); return(Ok()); }
public async void UpdateAsync(SuppliersDTM suppliersDTM) { var supplier = mapper.Map <Suppliers>(suppliersDTM); await Task.Run(() => uow.Suppliers.Update(supplier)); }