'System.Data.Objects.ObjectQuery
public object GetSuppliers()
{
ObjectQuery supplierQuery;
using(NorthwindEntities northwindContext = new NorthwindEntities())
{
supplierQuery = northwindContext.Suppliers;
}
return supplierQuery.ToList();
}
WTF? Hang on I've used code like this dozens of times before and never got this error before. It took quite a time for me to figure out that when the class was created by Visual Studio it had failed to add the usual using System.Linq; line at the top.
This lead me to think, why this was the case and I found this interesting article which describes extension methods.
Simple once you know the answer.