|
Post by mmudassir on Jun 29, 2011 13:36:17 GMT -5
Hello there,
I am new to LINQ and just found out that super duper tool (recommending to my team here ).
However when I converted my SQL to LINQ and after compiling it in LINQuer I got the following error:
"Error Compiling Expression: Error Compiling Expression: 'System.Linq.IQueryable<AnonymousType#1>' does not contain a definition for 'Contains' and the best extension method overload 'System.Linq.ParallelEnumerable.Contains<TSource>(System.Linq.ParallelQuery<TSource>, TSource)' has some invalid arguments Instance argument: cannot convert from 'System.Linq.IQueryable<AnonymousType#1>' to 'System.Linq.ParallelQuery<AnonymousType#2>'"
Here is my LINQ:
var query = from watchlist in db.pst_WatchLists where (from psv_useranalystaccesses in db.psv_UserAnalystAccesses where psv_useranalystaccesses.UserID == 59 select new { psv_useranalystaccesses.AnalystUserId }).Contains(new { watchlist.UserID }) select new { ....
I underline that buggy line.
Any help?
Thanks,
Mudassir
|
|
|
Post by Mikhail Oumantsev on Jun 29, 2011 18:57:09 GMT -5
It is hard to say, what is wrong. Probably there is a type conversion required. Please send me your connection files along with your SQL statement. Then I will be able to debug and fix it. Thanks, admin@sqltolinq.com
|
|