public IActionResult PlayerLoginPost(Players LoggedPlayer)
 {
     if ((_allPlayers.GetPlayerByName(LoggedPlayer.Profile) != null) && (GetHash(LoggedPlayer.Pass) == _allPlayers.GetPlayerByName(LoggedPlayer.Profile).Pass))
     {
         HttpContext.Session.GetString("LoggedPlayer");
         LoggedPlayer = _allPlayers.GetPlayerByName(LoggedPlayer.Profile);
         HttpContext.Session.SetString("LoggedPlayer", LoggedPlayer.Profile);
     }
     else
     {
         ModelState.AddModelError("Invalid Player", "Игрок с таким имененем не найден.");
         return(Redirect("/Players/PlayerLogin"));
     }
     //HttpContext.Session.SetInt32("1", 24);
     //ViewBag.test = HttpContext.Session.GetInt32("1");
     //Players person = SessionExtensions.Session.Get<Players>("person");
     // await context.Response.WriteAsync($"Hello {person.Name}, your age: {person.Age}!");
     //SessionExtensions.Set<Players>(context,"Logged", LoggedPlayer.Profile);
     return(Redirect("/Players/Account"));
 }