public async Task <IActionResult> Game(int?id) { if (id == null) { return(NotFound()); } var persons = await _pers.GetDetails((int)id); if (persons == null) { return(BadRequest()); } if (persons.User != HttpContext.User.Identity.Name && persons.User != "Default") { return(RedirectToAction(nameof(Index))); } GameViewModel model = _pers.GetGame(persons); return(View(model)); }