Esempio n. 1
0
        public async Task <ActionResult <CommentSearchViewModel> > Search(string searchTerm, PagingParams pagingParams)
        {
            var comments = await Mediator.Send(new GetCommentsBySearchQuery(searchTerm, pagingParams));

            var model = new CommentSearchViewModel {
                SearchTerm = searchTerm, CommentPage = new FrontendPage <GetCommentModel>(comments)
            };

            return(View(model));
        }
Esempio n. 2
0
        public async Task <IActionResult> List(CommentSearchViewModel model)
        {
            var result = await _service.Search(model.ToSearchModel());

            return(PartialView("_List", result));
        }