Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot use "Include" in Linqpad

Tags:

c#

linq

linqpad

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
like image 738
Yar Avatar asked Feb 09 '23 17:02

Yar


1 Answers

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".

like image 100
Yar Avatar answered Feb 15 '23 09:02

Yar