The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join'

by leftbrainlogic 9. November 2008 17:56

You're getting this error because you have written something like this:

   var t = (from e in E
            where e.column_one == condition_one
            join d in D on 
                 new {e.column_one, condition_two} equals
                 new {d.column_a, d.column_b}
            select new { e, d});

Instead of

   var t = (from e in E
            where e.column_one == condition_one
            join d in D on 
                 new {e.column_one, condition_two} equals
                 new {column_one = d.column_a, condition_two = d.column_b}
            select new { e, d});

Please help us improve by rating and commenting on this post.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , ,

Software Development

Add comment


(Will show your Gravatar icon)  

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen