예제 #1
0
        public async Task <IActionResult> GetBlogsAsync(int index, int size, string s)
        {
            var pager = Domain.Paginator.New(index, size, 1);

            pager["s"] = s ?? "";

            BlogsManager blogsManager = new BlogsManager();

            pager = await blogsManager.GetBlogListAsync(BlogsManager.ListType.Search, pager);

            return(Ok(pager));
        }
예제 #2
0
        public async Task <IActionResult> GetBlogsAsync(int index, int size, string s, int?state)
        {
            var pager = Domain.Paginator.New(index, size, 2);

            pager["s"]     = s ?? "";
            pager["state"] = state.HasValue ? state.Value.ToString() : "";

            BlogsManager blogsManager = new BlogsManager();

            pager = await blogsManager.GetBlogListAsync(BlogsManager.ListType.AdministartorSide, pager);

            return(Ok(pager));
        }