When querying on items with specific ids, is it OK to use CommonPart.Id?

Topics: Writing modules
Developer
Oct 4, 2012 at 9:48 PM

If with a ContentQuery I'd like to narrow items down to ones having specific ids, is it OK to do a

query.Where<CommonPartRecord>(record =>ids.Contains(record.Id));
? I mean, if the item is versioned, CommonPartRecord.Id will have the unique, non-changing id of the item?

Thanks in advance!

Developer
Oct 4, 2012 at 11:09 PM

Yes, CommonPartRecord.Id is the unique item id (equal to ContentItem.Id).

Developer
Oct 5, 2012 at 7:44 AM
Edited Oct 5, 2012 at 7:49 AM

Thanks! Then I'll continue to use this till it's possible with ContentQuery.