0

I am trying to join to tables on a column/property where it is nullable in one table and non-nullable in the other one

var x = from tr in testResults
        join u in Users
        on new { tr.SiteId, tr.UserId.Value } equals new { u.SiteId, u.UserId }                     
        into results
        from r in results.DefaultIfEmpty()
        select tr);

UserId is nullable in testResults and non-nullable in Users. I run into "The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'GroupJoin'". Anyone has a suggestion on how to fix this?

Sophonias
  • 874
  • 5
  • 16
  • 38

0 Answers0