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

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