// GET: PaymentGroup/Delete/5 public ActionResult Delete(Nullable <byte> id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Db db = new Db(DbServices.ConnectionString); PaymentGroup paymentGroup = PaymentGroupServices.Get(id.Value, db); if (paymentGroup == null) { return(HttpNotFound()); } return(View(paymentGroup)); }