public async Task <IActionResult> OnGetAsync(int?id) { if (id == null) { return(NotFound()); } var user = await _context.GetUserAsync(User); if (user == null) { return(NotFound()); } var platform = user.Platforms.SingleOrDefault(p => p.Id == id); if (platform == null) { return(NotFound()); } Platform = new PlatformModel(Request, Url, platform); return(Page()); }
public IActionResult OnGet() { Platform = new PlatformModel(Request, Url); return(Page()); }