public ActionResult Edit(ExpenseType expensetype) { if (ModelState.IsValid) { db.Entry(expensetype).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(expensetype); }
public ActionResult Create(ExpenseType expensetype) { if (ModelState.IsValid) { db.ExpenseTypes.Add(expensetype); db.SaveChanges(); return RedirectToAction("Index"); } return View(expensetype); }