What is the optimal way to perform the following query?
I have two tables with the following structure:

I want to find all “unowned” assets – where that means there is no AssetOwner record which has the AssetID and either no EndDate or an EndDate in the future.
I have made a first pass at this query:
return from a in db.Assets
where !db.AssetOwners.Any(o => o.AssetID == a.ID
&& (!o.EndDate.HasValue || o.EndDate > DateTime.Now))
select a;
But given that I lack experience with this, I want to know whether this is the optimal way to perform this query (I don’t even know what the options are).
Cheers,
Tim.
Pretty good so far. Try