I am trying to return one row back by a customer ID from a database using C# Linq. My code is
public Customer GetCustomerByID(int CustID)
{
return from c in DataContext.Customers.FirstOrDefault(i => i.ID == CustomerID) select t;
}
but the above gives the error "Could not find an implementation of the query pattern for source type 'Customer'. 'Select' not found. "
Could anyone advise how i could resolve this please?
Thanks
...
Go to the complete details ...