"in" operator in a object query where clause? RRS feed

  • Question

  • Hi,

    I'm looking to do something along the lines of:

    List<int> selectedItems = GetSelection();
    ObjectQuery<MyItem> items = Context.MyItem;
    IEnumerable<MyItem> i = (from item in items where item.Id in selectedItems select item)

    I can't seem to work out the syntax to do the bold bit.

    Any pointers greatly appreciated.

    Wednesday, May 28, 2008 11:04 AM


All replies