public ActionResult Create() { RaceBLL defRace = new RaceBLL(); defRace.RaceID = 0; return(View(defRace)); }
public ActionResult Create(RaceBLL collection) { { try { // TODO: Add insert logic here using (ContextBLL ctx = new ContextBLL()) { ctx.CreateRace(collection); } return(RedirectToAction("Index")); } catch (Exception ex) { ViewBag.Exception = ex; return(View("Error")); } } }