public void Delete(int orderID) { //Need to have error handling! var orderToDelete = orderRepo.GetById(orderID); orderRepo.Delete(orderToDelete); }
public async Task <ActionResult> Delete(int order_id) { OrderModel orders = new OrderModel { order_id = order_id }; await _orderItem.RemoveAll(order_id); await _order.Delete(orders); return(Ok()); }