Example #1
0
        public IActionResult Search(ChapterSearcherViewModel searcher)
        {
            if (searcher == null)
            {
                searcher = new ChapterSearcherViewModel
                {
                    PageIndex = 1,
                    PageSize  = 10
                };
            }

            var result = service.Search(
                searcher.PageSize,
                searcher.PageIndex,
                searcher.Keyword,
                searcher.CourseId,
                searcher.Status);

            return(Ok(result));
        }