public ActionResult Edit(TypeOfDay typeofday) { if (ModelState.IsValid) { context.Entry(typeofday).State = EntityState.Modified; context.SaveChanges(); return RedirectToAction("Index"); } return View(typeofday); }
public ActionResult Create(TypeOfDay typeofday) { if (ModelState.IsValid) { context.TypeOfDays.Add(typeofday); context.SaveChanges(); return RedirectToAction("Index"); } return View(typeofday); }