c# - EF 6: Include not building navigation properties -
i cant seem figure out why navigation property not getting built include statement. here method: public async task<ihttpactionresult> getcompanies(string id) { dbcontext.database.log = s => system.diagnostics.debug.writeline(s); var company = await dbcontext.companies.where(x => x.id.tostring() == id).include(x => x.startelaccounts).firstordefaultasync(); if (company != null) { return ok(this.themodelfactory.create(company)); } return notfound(); } when test sql debug log fields , values both objects. here models: public class companygroup { [key] public guid id { get; set; } [required] [maxlength(100)] public string name { get; set; } [required] [datatype(datatype.date)] public datetime firstbillingdate { get; set; } [required] public int termlength { get; set; } public virtual icollection<applicationuser> members { get; set; } ...