In my controller i am trying to use include with EF4 to select related entities, but the lambda expression is throwing the following error,
i have the related entity de
Well, the post is quite old, but just replying here to update it. Well, the Include()
method with Entity Framework 4.1 has extension methods and it also accepts a lambda expression. So
context.CustomerSites.Include(c => c.Customer);
is perfectly valid, all you need to do is use this:
using System.Data.Entity;