public ActionResult Edit(int id) { IGigDAC dac = new GigDAC(); var gig = dac.Get(id); var model = new GigEdit { Date = gig.StartDateTime, Description = gig.Description, GigID = gig.GigID, Venue = gig.Venue }; return View(model); }
public ActionResult Edit(GigEdit gig) { if (!ModelState.IsValid) return View(gig); IGigDAC dac = new GigDAC(); dac.Update(gig.GigID, gig.Description, gig.Venue, gig.Date); return RedirectToAction("Index"); }