I wish to select only the first record from the 'CustomerSubOwners
' table in join query below and wondered what was the best way to achieve this in LINQ.
var result= (from t1 in db.Cases
from t2 in db.CustomerSubOwners
.Where(o => t1.CustomerId == o.CustomerId && o.Expiry >= DateTime.Now)
.DefaultIfEmpty()
select t1);