public ActionResult Edit(Player player)
        {
            if (ModelState.IsValid)
            {
                _playerService.Update(player);

                return RedirectToAction("Index");
            }
            ViewBag.LeagueIdList = new SelectList(_playerService.GetLeagues(), "LeagueId", "Name", player.LeagueId);
            return View(player);
        }
 public void Update(Player player)
 {
     DbContext.Entry(player).State = EntityState.Modified;
     DbContext.SaveChanges();
 }
 public void Add(Player entity)
 {
     DbContext.Players.Add(entity);
     DbContext.SaveChanges();
 }