This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I wonder if this behavior really works as designed. int[] a=new int[] { 4, 6, 8, 10, 12 }; // this works fine // this throws an exception (see below) "This overload of method 'Contains' has no supported translation in LightSpeed." bei Mindscape.LightSpeed.Linq.Translations.SequenceContains.Apply(QueryExpression applyTo, DataProvider provider, QueryExpression[] arguments) |
|
|
Thanks for drawing our attention to this. We were handling the IEnumerable<T>.Contains() extension method, but not the List<T>.Contains instance method. I've committed a fix for this and it will be included in nightly builds dated 6 Feb 2010 and above, available from about 1500 GMT. If you need a workaround in the meantime, you can insert a call to AsEnumerable on your List<int>: if (uow.Primes.Any(_prime => li.AsEnumerable().Contains(_prime.Value))) This makes LINQ use the Contains extension method, which we handle correctly, instead of the instance method. |
|
|
Hi Ivan, works great. Thx Remo |
|