c# - Entity Framework LINQ Include - Child Entities -
c# - Entity Framework LINQ Include - Child Entities -
i loading kid entity userstarted
transactiondetails
var result = (from in context.transactions.include(_ => _.transactiondetails.select(us => us.userstarted)) select a).singleordefault();
now want load entity, don't know how. entity similar userstarted
, it's userended
transactiondetails
thank much
you can chain multiple include predicates together:
var result = context.transactions .include(transaction => transaction.transactiondetails.select(us => us.userstarted)) .include(transaction => transaction.transactiondetails.select(us => us.userended)) .singleordefault();
c# linq entity-framework
Comments
Post a Comment