Linq to SQL query error
        Posted  
        
            by Tom Kong
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Tom Kong
        
        
        
        Published on 2010-06-18T08:46:29Z
        Indexed on 
            2010/06/18
            8:53 UTC
        
        
        Read the original article
        Hit count: 463
        
c#
|linq-to-sql
public class Service1 : IService1
{
    [OperationContract]
    public List<decmal> GetEnterCounts(DateTime StartTime, DateTime EndTime)
    {
        var db = new FACT_ENTER_EXIT();
        return (from e in **db.ENTER_CNT** where StartTime < db.DATE_ID && db.DATE_ID > EndTime select e).ToList();
    }
}
Ok, so I have this database FACT_ENTER_EXIT containing the field ENTER_CNT (nullable = false, type = decimal) which I want to return as a list
VS2010 spits out the following error at 'db.ENTER_CNT':
Error 1 Could not find an implementation of the query pattern for source type 'decimal'. 'Where' not found.
I must be missing something, could someone please point out where I'm going wrong??
Thanks in advance, Tom
© Stack Overflow or respective owner