public ActionResult DeleteConfirmed(int id) { MinorQuota minorQuota = db.MinorQuotas.Find(id); db.MinorQuotas.Remove(minorQuota); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,MinorQuotas")] MinorQuota minorQuota) { if (ModelState.IsValid) { db.Entry(minorQuota).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(minorQuota)); }
public ActionResult Create([Bind(Include = "Id,MinorQuotas")] MinorQuota minorQuota) { if (ModelState.IsValid) { db.MinorQuotas.Add(minorQuota); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(minorQuota)); }
// GET: MinorQuotas/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } MinorQuota minorQuota = db.MinorQuotas.Find(id); if (minorQuota == null) { return(HttpNotFound()); } return(View(minorQuota)); }