public ActionResult Create(tVenue venue) { try { // TODO: Add insert logic here if (ModelState.IsValid) { db.tVenue.Add(venue); db.SaveChanges(); return RedirectToAction("Index"); } return View(venue); } catch { return View(venue); } }
// // GET: /tSection/ public ActionResult Index(tVenue venue) { var sections = db.tSection.Where(a=>a.tVenueId==venue.tVenueId); ViewBag.tVenueId = venue.tVenueId; return View(sections); }
public ActionResult Edit(tVenue venue) { if (ModelState.IsValid) { db.Entry(venue).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(venue); }