public ActionResult Edit(Sellers model) { try { if (ModelState.IsValid) { db.Entry(model).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(); } catch (Exception ex) { return View(); } }
public ActionResult Create(Sellers model) { try { if (ModelState.IsValid) { // TODO: Add insert logic here db.Sellers.Add(model); db.SaveChanges(); return RedirectToAction("Index"); } return View(); } catch (Exception ex) { return View(); } }
public ActionResult Delete(Sellers model) { try { // TODO: Add delete logic here db.Entry(model).State = System.Data.Entity.EntityState.Deleted; db.SaveChanges(); return RedirectToAction("Index"); } catch (Exception ex) { return View(); } }