예제 #1
0
        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);
        }
예제 #2
0
 public ActionResult Edit(Place place)
 {
     if (ModelState.IsValid)
     {
         _eventoDB.Entry(place).State = EntityState.Modified;
         _eventoDB.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(place);
 }