Ordering by ContentItem Owner

Topics: Customizing Orchard, Writing modules
Mar 9, 2013 at 8:10 AM
Hi there!

Through much searching I have been unable to figure out how to order by a ContentItem's Owner. I believe the owner is part of the CommonPart, but I can't quite figure out how to work that into a Linq query.

Here's what I've been working with:
var results=Services.ContentManager
                .OrderByDescending<ContentPart>(x => x.ContentItem.CommonPart.Owner.)
This doesn't work of course, but it's along the lines of where I'm trying to go with this.

Any thoughts? I'd appreciate any pointers.

Mar 9, 2013 at 8:00 PM
Query can take a record type. That should help.
Mar 12, 2013 at 7:14 AM
Thanks Bertrand.

How would that work with a ContentType that has been created through the CMS? What would be the Record be?
Mar 12, 2013 at 7:24 AM