Пример #1
0
 public ActionResult Create(Bet newBet)
 {
     if (base.ModelState.IsValid)
     {
         var e = new BabyBet1Entities();
         e.Bets.Add(newBet);
         e.SaveChanges();
         Redirect("Index");
     }
     return View(newBet);
 }
Пример #2
0
        //
        // GET: /Bet/
        public ActionResult Index()
        {
            var e = new BabyBet1Entities();

            return View(e.Bets);
        }