5

I am connecting to an Oracle DB and want to do a simple query using Include:

enter image description here

but I am getting this error:

CS1061 'ISessionTable<People>' does not contain a definition for 'Include' and no extension method 'Include' accepting a first argument of type 'ISessionTable<People>' could be found (press F4 to add a using directive or assembly reference) 

I have already added these References:

System.Data.Entity.dll
System.Data.Linq.dll
Yar
  • 7,020
  • 11
  • 49
  • 69

2 Answers2

9

Here's what I did: First off, add EntityFramework.dll in you Additional References (Press F4!). If you can't find it, download it from here

Then switch to "C# Statement(s)" and add using System.Data.Entity; and it should work. It seems as an alternative you also can add System.Data.Entity in "Additional Namespace Imports".

Yar
  • 7,020
  • 11
  • 49
  • 69
0

Go to Query Properties and in 'Additional Namespaces', include System.Data.Objects

The Include method is not supported with LINQ to SQL.

See this.

maxshuty
  • 9,708
  • 13
  • 64
  • 77
  • _Also, I take it that you're connecting to a custom Entity Framework context? The Include method is not supported with LINQ to SQL._ [their](http://forum.linqpad.net/discussion/205/include-extension-method-is-not-found) – dovid Jun 20 '19 at 09:24