I wonder if there is some way to connect without using Lazy Loading Virtual attribute? For Code Analysis does not let me use VIRTUAL, and would not assign the SUPPRESS.

Could anyone help me with this? Thank you.

share|improve this question
    
possible duplicate of Syntax for virtual members – Colin Nov 14 '13 at 9:42
    
Are you getting a "virtual call in constructor" warning? Either use a private setter or a backing field. stackoverflow.com/questions/4776049/syntax-for-virtual-membe‌​rs – Colin Nov 14 '13 at 9:44

Entity Framework lazy loading works by creating instances of dynamic proxy types which derive from your types and override their virtual properties. The out-of-the-box lazy loading therefore requires those properties to be virtual.

share|improve this answer
    
is a single way? – Douglas Costa Nov 13 '13 at 15:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.