public async Task <IActionResult> Details(string id) { if (id == null) { throw new ApplicationException($"Passed ID parameter is absent."); } var match = await _matchService.FindAsync(id); if (match == null) { throw new ApplicationException($"Unable to find match with ID '{id}'."); } var model = new MatchDetailsViewModel(match); return(View(model)); }