Ejemplo n.º 1
0
 public ActionResult Edit(Concert concert)
 {
     if (ModelState.IsValid)
     {
         repository.SaveConcert(new Concert()
         {
             ConcertId = concert.ConcertId,
             Date      = concert.Date,
             Content   = concert.Content
         });
         TempData["message"] = string.Format("{0} has been saved", concert.ConcertId);
         return(RedirectToAction("Index"));
     }
     else
     {
         return(View(concert));
     }
 }