protected List <BlogBase> GetBlogsByCategory() { List <BlogBase> MoreBlogs = BlogBase.ReadBlogBasesFromDatabase(Category, 10, (FetchedBlogs.Count - 1)); foreach (BlogBase b in MoreBlogs) { FetchedBlogs.Add(b); } return(MoreBlogs); }
protected override void OnInitialized() { Console.WriteLine("Inside init getting first batch of blogs"); TotalNumberOfBlogs = BlogBase.GetTotalNumberOfBlogBases(Category); List <BlogBase> InitialBlogs = BlogBase.ReadBlogBasesFromDatabase(Category, 10, 0); foreach (BlogBase b in InitialBlogs) { FetchedBlogs.Add(b); } Console.WriteLine($"Blogs = {this.FetchedBlogs.Count}"); }