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