score:1

Accepted answer

this will work in efv4. try it in efv1:

var tagids = new int[] { 6, 7 };
var query = context.tags
                   .where(t => tagids.contains(t.id))
                   .selectmany(t => t.posts);

edit:

i checked it and collection valued parameters + contains were added in efv4 so above example doesn't work in efv1. this thread in msdn forum provides workaround to allow in operator in efv1. another recommended workaround is simply upgrade to efv4 because there are many other improvements including significant improvement of performance.


Related Query

More Query from same tag