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