>>>>>>I'm trying to retrieve an application from my database. I have a Data Context in my app called AppSecurityDataDataContext. Here's my query:
>>>>>>
>>>>>>
>>>>>>{
>>>>>> AppSecurityDataDataContext dc = new AppSecurityDataDataContext();
>>>>>> var app = from a in dc._Applications
>>>>>> where a.ApplicationId = ApplicationID
>>>>>> select a;
>>>>>>
>>>>>>}
>>>>>>
>>>>>>
>>>>>>I'm getting "Could not find an implementation of the query pattern for source type 'System.Data.Linq.Table<AppSecurity._Application>'. 'Select' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?"
>>>>>>
>>>>>>I have the using statement in my class. This other method works:
>>>>>>
>>>>>>
>>>>>>public static void AddApplication(Application Application)
>>>>>>{
>>>>>> _Application app = new _Application
>>>>>> {
>>>>>> ApplicationName = Application.ApplicationName
>>>>>> };
>>>>>>
>>>>>> _DataContext._Applications.InsertOnSubmit(app);
>>>>>>
>>>>>> try
>>>>>> {
>>>>>> _DataContext.SubmitChanges();
>>>>>> }
>>>>>> catch (Exception e)
>>>>>> {
>>>>>> }
>>>>>>}
>>>>>>
>>>>>>
>>>>>>Anyone see what's wrong here?
>>>>>
>>>>>==
>>>>
>>>>umm, huh? What does "==" mean?
>>>Not the same as "=":
where a.ApplicationId = ApplicationID
>>
>>If I remove the Where clause, the comp error still occurs
>
>Then it looks as if it indeed isn't able to reference the System.Linq namespace (Your second example isn't using Linq). Are you sure you have a reference to the System.Core.dll in the project?
My bad. I was using System.Data.Linq, not System.Linq. Not it works.
So that begs the question: What the difference between the two?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people