Пример #1
0
        //
        // GET: /Player/Details/5
        public ActionResult Details(string id = "")
        {
            Player player = db.Players.Find(id);

            if (player == null)
            {
                return HttpNotFound();
            }

            Statistic st = new Statistic();

            PlayerDetailsViewModel ViewModel = new PlayerDetailsViewModel();
            ViewModel.Player = player;
            ViewModel.OverallPlayerData = st.getOverallPlayerData(player);

            return View(ViewModel);
        }
Пример #2
0
 public HomeViewModel()
 {
     Statistic st = new Statistic();
     overallPlayerData = st.getOverallPlayerData();
 }