S
shapper
Hello,
I have the following Linq Query:
viewData.TagsPapers = (from t in database.Tags
select new TagPaper {
Tag = t,
Count = t.PostsTags.Count
} into tp
where tp.Count != 0
orderby tp.Tag.Name, tp.Count
descending
select tp).Take(20).ToList();
I don't think this is making what I need.
I want to get the 20 records that have an higher value of tp.Count.
Then I need to order those 20 records by their tp.Tag.Name.
What am I doing wrong?
Thanks,
Miguel
I have the following Linq Query:
viewData.TagsPapers = (from t in database.Tags
select new TagPaper {
Tag = t,
Count = t.PostsTags.Count
} into tp
where tp.Count != 0
orderby tp.Tag.Name, tp.Count
descending
select tp).Take(20).ToList();
I don't think this is making what I need.
I want to get the 20 records that have an higher value of tp.Count.
Then I need to order those 20 records by their tp.Tag.Name.
What am I doing wrong?
Thanks,
Miguel