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)); }
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)); }