public async Task <IActionResult> Index(UserProfileCommentIndexViewModel viewModel) { IEnumerable <UserProfileComment> userProfileComments = await userProfileCommentService.GetAllAsync(); viewModel.UserProfileComments = userProfileComments; return(View(viewModel)); }
public async Task <ApiResponse> GetAll() { IEnumerable <UserProfileComment> result = await userProfileCommentService.GetAllAsync(); if (result != null) { return(new ApiResponse(result, ResponseStatusCode.Success, "Successfully returned User Profile Comment list.")); } return(new ApiResponse(result, ResponseStatusCode.Error, "Could not return User Profile Comment list.")); }