示例#1
0
 public async Task <IHttpActionResult> Delete(int id)
 {
     try
     {
         if (await repository.Delete(id))
         {
             return(Ok());
         }
         return(NotFound());
     }
     catch (HttpException)
     {
         return(NotFound());
     }
 }
示例#2
0
        public void Delete(SaleOrderContract saleOrderContract)
        {
            var saleorder = SaleOrderRepository.Get(saleOrderContract.Id);

            SaleOrderRepository.Delete(saleorder);
        }