Requirement
- I need to join Table1 and Table2
- The key between two tables are ID which is System.Guid type and is non-nullable value type
- If Table2.ID is null, I need to get null record from Table1.
LINQ syntax I wrote is as follows.
from records in DBContext.Table1
join history in DBContext.Table2 into recordhistory
from records in recordhistory.DefaultIfEmpty()
select (n => n);
The error I got is "The null value cannot be assigned to a member with type System.Guid which is a non-nullable value type."
Can someone advise me on this? Thank you very much.