public IHttpActionResult DeletOrderbyId(int id) { try { OM.DeleteOrder(id);; return(Ok("pppp0")); } catch (Exception e) { return(BadRequest(e.ToString())); } }
public IActionResult DeleteOrder(int id) { try { logic.DeleteOrder(id); return(NoContent()); } catch (Exception ex) { return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message)); } }
public ActionResult DeleteOrder(int id, FormCollection collection) { try { // TODO: Add delete logic here orderLogic.DeleteOrder(id); return(RedirectToAction("IndexOrder")); } catch { return(View()); } }
public async Task <IActionResult> DeleteOrderDetails([FromRoute] int id) { return(Ok(await _order.DeleteOrder(id))); }