public string BuyPlayer(int Id)
 {
     if (!User.Identity.IsAuthenticated)
         return "Авторизируйтесь для покупки игроков";
     PlayerLogic logic = new PlayerLogic();
     UserLogic userLogic = new UserLogic();
     int teamId = userLogic.GetIdByNameUser(User.Identity.Name);
     try
     {
         logic.BuyPlayer(Id, teamId);
     }
     catch (Exception exception)
     {
         return exception.Message;
     }
     return "Трансфер совершён успешно";
 }
 public IEnumerable<Player> GetMidfielders()
 {
     PlayerLogic logic = new PlayerLogic();
     return logic.GetPlayersByPosition("Полузащитник");
 }
 public IEnumerable<Player> GetForwards()
 {
     PlayerLogic logic = new PlayerLogic();
     return logic.GetPlayersByPosition("Нападающий");
 }
 public IEnumerable<Player> GetDefenders()
 {
     PlayerLogic logic = new PlayerLogic();
     return logic.GetPlayersByPosition("Защитник");
 }
 public IEnumerable<Player> GetCeapers()
 {
     PlayerLogic logic = new PlayerLogic();
     return logic.GetPlayersByPosition("Вратарь");
 }
 public IEnumerable<Player> Get()
 {
     PlayerLogic logic = new PlayerLogic();
     return logic.GetAllPlayers();
 }