// GET: GameSpecifications/Create
 public ActionResult Create()
 {
     var vm = new GameSpecificationCreateEditViewModel();
     vm.PlayerSelectList = new SelectList(_uow.Players.GetAllForUser(User.Identity.GetUserId<int>()), nameof(Player.PlayerId), nameof(Player.FullName));
     //ViewBag.PlayerId = new SelectList(_uow.Players.All, "PlayerId", "FirstName");
     return View(vm);
 }
        public ActionResult Create(GameSpecificationCreateEditViewModel vm)
        {
            if (ModelState.IsValid)
            {
                _uow.GameSpecifications.Add(vm.GameSpecification);
                _uow.Commit();
                return RedirectToAction("Index");
            }

            vm.PlayerSelectList = new SelectList(_uow.Players.GetAllForUser(User.Identity.GetUserId<int>()), nameof(Player.PlayerId), nameof(Player.FullName), vm.GameSpecification.PlayerId);
            return View(vm);
        }
        // GET: GameSpecifications/Edit/5
        public ActionResult Edit(int? id)
        {
            if (id == null)
            {
                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
            }
            GameSpecification gameSpecification = _uow.GameSpecifications.GetById(id);
            if (gameSpecification == null)
            {
                return HttpNotFound();
            }

            var vm = new GameSpecificationCreateEditViewModel()
            {
                GameSpecification = gameSpecification
            };

            vm.PlayerSelectList = new SelectList(_uow.Players.GetAllForUser(User.Identity.GetUserId<int>()), nameof(Player.PlayerId), nameof(Player.FullName), vm.GameSpecification.PlayerId);
            return View(vm);
        }