I have 2 Generic Lists called Students and Entries They are in 1 to 0..1 relationship. Students 1:0..1 Entries
I want to get the list of Student Name, ID and English, Maths detail from Entries if exists.
My LINQ query is as below and I got the null reference error at se.English. Could you pls help? Thanks.
var query = from s in students
join t in entries
on s.StudentDetailID equals t.StudentDetailID into StudentEntries
from se in StudentEntries.DefaultIfEmpty()
select new { s.StudentDetailID, s.LastName, s.FirstName,
se.English};