Пример #1
0
        // GET: SportGames/Create
        public ActionResult Create()
        {
            ViewBag.CategoryId = new SelectList(db.sportCategories, "Id", "CategoryName");
            IEnumerable <SportCategory> sportCategorys = _sportCategoryRepository.GetAllSportCategory();

            ViewBag.SportCategorys = sportCategorys.ToList();
            return(View());
        }
Пример #2
0
        public ActionResult Index()
        {
            var sportCategories  = _sportCategoryRepository.GetAllSportCategory().ToList();
            var sportCoeficients = GetCoeficients();

            ViewBag.Coeficient = sportCoeficients;
            ViewBag.Categorys  = sportCategories;
            var profile = _profileRepository.getFirstUser();

            ViewBag.Profile = profile;
            var sportGames = _sportGameRepository.GetAllSportGames().ToList();

            return(View(sportGames));
        }