Monday, September 17, 2007 6:11 AM
EMMSDatabaseDataContext data = new EMMSDatabaseDataContext("Server=laver-chen;Database=EMMS;User=sa;Password=*****");
var dst = from p in data.InspectionSafeties
Error 1 Could not find an implementation of the query pattern for source type 'System.Data.Linq.Table<EMMS.Entity.InspectionSafety>'. 'Select' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'? D:\wwwroot\EMMSDesktop\EMMS.Facade\Inspection\frmRoadSafety.cs 127 34 EMMS.Facade
who help me?
Monday, September 17, 2007 9:01 AMYou need to add
to your namespace imports. The compiler translates comprehension queries into lambda syntax, which require methods called "Where", "Select", "OrderBy", etc to be in scope in order to resolve. Importing the System.Linq namespace puts the Enumerable and Queryable classes in scope, which define these standard querying methods.
Tuesday, November 18, 2008 9:14 PM
For anyone who sees this error message but already has the correct using statements...I saw this error while trying to run Linq queries against a strongly typed data set with EnforceConstraints disabled.
Setting EnforceConstraints back to True in the designer fixed it.
Tuesday, January 13, 2009 10:50 AM
I am using the AdventureWorks database
I created a new LINQToSQL Class, dragged all of the Employee schema from the Server Explorer to the designer, and tried to reference the Employee Class in Code:var query = from employee in Employee
I get the same error message:
Could not find an implementation of the query pattern for source type 'Com.Tff.LINQToSQL.Employee'. 'Select' not found.
Oddly, you can not specify the Select property in the Employee Data Class. - only has Insert, Delete, Update
Tuesday, January 13, 2009 4:04 PM
It looks like you are querying against the type instead of an instantiated object. Try something like this...
AdventureWorksDataContextcontext = new AdventureWorksDataContext();
from employee in context.Employees
In this example, AdventureWorksDataContext is the Name property in the LINQ to SQL designer (.dbml file).
Tuesday, January 13, 2009 5:14 PM
Friday, January 15, 2010 9:14 PM@Eric Lemmon:
Thanks! Your solution about EnforceConstraints on the typed dataset fixed my issue.
Strangely, this error only started after I refactored my Typed Dataset into another library.
- Zach Pennington
Thursday, May 26, 2011 9:00 AM
I m querying against a instantiated object only and also have system.linq in using... I am also referring System.Core dll (using 4.0 framework)... still i m getting the same issue
Thanks & Regards,
Taher N D
Friday, September 23, 2011 10:07 PMThank's Joe.
Thursday, November 01, 2012 9:06 AMOhhh dude.. Hail You bro. Got tired of looking and trying. This is the solution I was looking for.