// DELETE: odata/Warehouse(5) public IHttpActionResult Delete(Guid key) { // TODO: Add delete logic here. using (var unitOfWork = _unitOfWorkManager.NewUnitOfWork()) { _paymentType.DeletePaymentType(key); unitOfWork.Commit(); } return(StatusCode(HttpStatusCode.OK)); //return StatusCode(HttpStatusCode.NotImplemented); }
public ActionResult Delete(int id) { if (pth.DeletePaymentType(id)) { TempData["Message"] = "Payment Type successfully deleted"; return(RedirectToAction("Index")); } else { return(View()); } }