Entity Framework 4 POCO - Lazy + Eager Download

I have the following DB structure (simplified version):

Comments - CommentId, UserId
Users - UserId
UserDetails - UserId, Address, Phone, etc.

I use EF 4with POCOs. The Userclass property is Commentmarked as virtual(to enable lazy loading for it). However, I want when the property is Userloading (lazy), as well as its property UserDetailsto load (the Users - UserDetails ratio is 1: 1). Is it possible? Can I point it out somehow? I want to do lazy + impatient loading somehow.

+3
source share
1 answer

, . , , . , .

+1

Source: https://habr.com/ru/post/1756697/


All Articles