关于 LinqKit.Microsoft.EntityFrameworkCore v1.1.16
的使用我读到这应该和query.ToString();一样简单。但这似乎在.Net core 2.2中不起作用。您只会得到像;;这样的反射字符串。
“ Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions + IncludableQueryable`2 [Entities.Models.Contact,Entities.Models.Email]”
Microsoft.EntityFrameworkCore.Query.IIncludableQueryable<Contact,Entities.Models.Email> query = Context.Contact
.AsExpandable()
.Include(c => c.BusinessContact).ThenInclude(b => b.BusinessContactType)
.Include(c => c.ContactAddress).ThenInclude(ca => ca.Address)
.Include(c => c.ContactTelephone).ThenInclude(ct => ct.Telephone)
.Include(c => c.ContactEmail).ThenInclude(ce => ce.Email);