Click here to Skip to main content
15,890,882 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
I am trying to join between 2 queries using LINQ, I am using the following code:

accounts = from a in accounts<br />           join ab in accountBalance<br />           on a.ACCOUNT_ID equals ab.ACCOUNT_ID<br />           where ab.CURRENCY_ID == currencyID<br />           select a;


given that accounts and accountBalance are both output of LINQ queries.

When compiling this piece of code I get the following error:

Cannot implicitly convert type 'System.Collections.Generic.IEnumerable<AnonymousType#1>' to 'System.Data.EnumerableRowCollection<AnonymousType#1>

I don't understand the reason behind this error since the query seems right.

Posted

1 solution

Check this site. A person with very similar kind of problem of yours found this solution.

http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/bce2aced-2284-498a-b206-a9203cd19937[^]


Hope this helps
:)

 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900