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