I want to implement a Page where each Category have its related articles, I have implemented it as follow:
ArticlesHomeViewModel articles = new ArticlesHomeViewModel
{
category1 = db.Articles.Include(o => o.Category).Where(m => m.category == "Category One Name").limit(4),
category2 = db.Articles.Include(o => o.Category).Where(m => m.category == "Category two Name").limit(4),
category3 = db.Articles.Include(o => o.Category).Where(m => m.category == "Category Three Name").limit(4),
category4 = db.Articles.Include(o => o.Category).Where(m => m.category == "Category Four Name").limit(4),
}
And I want to merge them into one query to be able to loop against them in the view because I don't know how many categories that could be in the system.