public async Task <IActionResult> ViewDetails(int?id) { var details = await _eventPageService.ViewDetails(id.Value); var ans = await _eventPageService.GetAllCommentByEventId(id.Value); details.Comments = ans; if (details == null) { return(RedirectToAction("GetEvents")); } return(View(details)); }
public async Task <IActionResult> OnGet(int?Id) { if (Id == null) { return(NotFound()); } _eventViewModel = await _eventPageService.ViewDetails(Id.Value); if (_eventViewModel == null) { return(NotFound()); } return(Page()); }