示例#1
0
        public async Task <IHttpActionResult> GetAsync(int id)
        {
            SuppliersDTM supplier = await service.GetByIdAsync(id);

            if (supplier == null)
            {
                return(NotFound());
            }
            return(Ok());
        }
示例#2
0
        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());
        }
示例#3
0
 public async void UpdateAsync(SuppliersDTM suppliersDTM)
 {
     var supplier = mapper.Map <Suppliers>(suppliersDTM);
     await Task.Run(() => uow.Suppliers.Update(supplier));
 }