>I am the newest of Linq newbies so feel free to speak slowly and use small words <bg>
>
>I have list of integers.
>
>I have a business object of strongly type properties.
>( the bo implements ienumerable through one of its own functions but if I can't get that to work I can convert the data to an array or some other object that implement the interface in a standard way. The bos also expose all standard ado properties re datatable, currentview etc if that helps)
>
>There are properties
>
>ikey,description, itemplateskey
>
>I want to select the bo.ikey where itemplateskey is not in the list of integers.
>
>(corallaries would includes selecting all records from one bo where some value in that bo is found or not found in some field in another bo )
>
>I think I've stripped down the problem to the essentials. Any help on linq subquery syntax with be appreciated as I think that is probably going to be the most elegant solution for a lot of this kind of stuff
>
>TIA
Viv already covered it really. I am only doing a second pass with small letters:)
IEnumerable, IQueryable,List,Array ... IOW anything that you can enumerate locally or remotely should remind you Linq:) So you don't need to get an array (Linq do that for you if you want with .ToArray() extension method).
var query = boCollection.Where( bo => !intList.Contains( bo.itemplateskey ) ).Select( bo => bo.ikey );
var query = from bo in boCollection
where !intList.Contains( bo.itemplateskey )
select bo.ikey;
Cetin