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