CS1061 ''Include' and no accessible extension metho
I am getting this error
CS1061 'Table' does not contain a definition for 'Include' and no accessible extension method 'Include' accepting a first argument of type 'Table' could be found (press F4 to add a using directive or assembly reference)
I found information for solving this, but it was for entity frame work and we are using entity frame work core.
I included Microsoft.EntityFramewrokCore.dll in my query properties.
What am I missing?
Comments
Are you using the (default) LINQ-to-SQL driver? If so, you need to use DataLoadOptions instead of Include:
https://docs.microsoft.com/en-us/dotnet/api/system.data.linq.dataloadoptions?view=netframework-4.8
Are there non default drivers available that will allow using include? We are seeing if we can use this to assist in debugging and testing code and the code will use includes. We want to copy and past into Linqpad to test the queries
LINQPad 6 lets you connect to a database via Entity Framework Core, which supports the Include method. Click "Add connection" and choose "Entity Framework Core".
Thanks. I connected via framework core and it works. I just assumed since the underlying database was SQL that I needed to use the SQL connection.