Пример #1
0
        public ActionResult Create()
        {
            RaceBLL defRace = new RaceBLL();

            defRace.RaceID = 0;
            return(View(defRace));
        }
Пример #2
0
 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"));
         }
     }
 }