Nullable object must have a value when including a grandchild with a null child

c# entity-framework-6

Accepted Answer

Use ThenInclude :

var workItems = _context.WorkItems
        .Include(x => x.Contract)
        .ThenInclude(contract => contract.ContractAccount);
1
1/7/2019 3:20:26 PM

Popular Answer

ZZZ_tmp


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow