Beispiel #1
0
        public ActionResult MostUsed()
        {
            IQueryable <Tag> mostUsedTags = db.Tags.
                                            Include("Posts").
                                            OrderByDescending(tag => tag.Posts.Count).
                                            Take(5);

            return(PartialView(TagModel.FromEntity(mostUsedTags)));
        }
Beispiel #2
0
 // GET: Management/Tags
 public ActionResult Index()
 {
     return(View(TagModel.FromEntity(db.Tags.AsQueryable())));
 }