I can't find "Include" method with lambda expression in Entity framework?

.net c# entity-framework

Question

I am using entity framework and I can't find include method like in this example:

using(ArticleExtractorEntities db=new ArticleExtractorEntities())  
{
    Preference pref= db.Preferences.Include(  

here i find only the function include with the parameter (string path) and I don't find any other overload so how can I use Include with lambda expression?

1
32
6/29/2012 9:41:20 AM

Accepted Answer

it's not in System.Linq. Add

using System.Data.Entity
91
6/29/2012 9:42:19 AM

Popular Answer

Update. For those looking how it extend your linq query with .Include()

No longer is it:

using System.Data.Entity;

With netcoreapp1.0 it is:

using Microsoft.EntityFrameworkCore;


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow