public IHttpActionResult Delete(int id) { var data = _objContext.GetProductByID(id); if (data == null) { return(NotFound()); } _objContext.DeleteProduct(id); //return Content(HttpStatusCode.NoContent, ""); return(Ok(id)); }
public ActionResult Delete(int id = 0) { ProductDataContext.DeleteProduct(id); return(RedirectToAction("Index")); }