public ActionResult MyPosts(string display, string sortBy, string orderBy, string search, int page = 1) { var sortParameters = new SortParametersDto() { OrderBy = orderBy ?? "asc", SortBy = sortBy ?? "Title", CurrentPage = page, PageSize = 10, DisplayType = display ?? "list" }; var posts = _postsService.GetCurrentUserPosts(User.Identity.GetUserId(), sortParameters, search); posts.DisplayType = display ?? "list"; return(View(posts)); }