This project is read-only.

Select content items via SQL IN query

Topics: General, Troubleshooting, Writing modules
Dec 15, 2014 at 10:45 PM
Currently I select many items with a query via:
_contentManager.Query<MatchPart, MatchPartRecord>("MatchReport")
                .Where(m => m.FsiMatchId == id)
I select a single item via:
_contentManager.Query<MatchPart, MatchPartRecord>("MatchReport")
                .Where(m => m.FsiMatchId == id).Slice(0, 1).SingleOrDefault();
If I want to select many items passing an array of ID's how would I do that? i.e it would convert to an sql IN statement.
Dec 16, 2014 at 11:13 AM
I think you're looking for the GetMany<T> method on IContentManager. That one takes an enumerable of content item ids, and returns an enumerable of content items.