public ActionResult Sidebar()
{
var tags = from t in DbContext.Tags
where t.Posts.Count > 0
orderby t.Posts.Count descending
select new TagSidebarViewModel
{
Id = t.Id,
TagText = t.TagText,
Count = t.Posts.Count
};
return View("Sidebar", tags.ToList());
}