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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -