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