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