public ActionResult Create(Place place) { if (ModelState.IsValid) { place.Guid = "{" + Guid.NewGuid().ToString().ToUpper() + "}"; _eventoDB.Places.Add(place); _eventoDB.SaveChanges(); return RedirectToAction("Index"); } return View(place); }
public ActionResult Edit(Place place) { if (ModelState.IsValid) { _eventoDB.Entry(place).State = EntityState.Modified; _eventoDB.SaveChanges(); return RedirectToAction("Index"); } return View(place); }