Last post Aug 21, 2017 07:57 AM by Cathy Zou
Aug 18, 2017 12:09 PM|polkpolk090|LINK
I have a code:
IQueryable<Individual> individuals = _context.Individuals
.Include(i => i.GroupType)
.Where(i => i.GroupTypeId == gId);
And records in my DB:
Second Include() method returns null and it makes whole query to return empty object. DynastyType is an optional property, so why it happens?
Aug 18, 2017 08:55 PM|anas|LINK
Did you try to remove the where condition ? is it returing data in this case? I don't think including an optional property will cause this issue.
Aug 21, 2017 07:57 AM|Cathy Zou|LINK
As far as I know, If the navigate attribute can be empty, it should be left join
You could check jBelanger answer in the following thread: