title: Entity Framework: query against view in EF (C# code) returns duplicate results
body: <p>I'm using EF to query against a DB View. the query can return correct number of records, <strong>but all the records are the same.</strong> However, when i run the raw query in sql SSMS, everything is fine.<br>
  Can somebody give some clue about the possible root cause?  </p>
  
  <p>The view definition is like:<br>
  </p>
  
  <pre><code> CREATE VIEW [dbo].[v_JobAEWeekly]
    AS
    SELECT        
    VCId, 
    JobRegistryId, 
    JobNamingId, 
    JobPrefix, 
    DATEADD(dd, DATEDIFF(week, CONVERT(DATETIME, '2013-01-01 00:00:00', 102), JobDate) * 7 - 2, CONVERT(DATETIME, '2013-01-01 00:00:00', 102)) AS JobDateWeekSeqStartDate,       
    COUNT(*) AS JobCounts,    
    FROM            dbo.HistoricalJobInfo
    WHERE        (JobStateId = 2) AND (TotalYieldTimeInMinutes = 0)
    GROUP BY VCId, JobRegistryId, JobNamingId, JobPrefix, DATEADD(dd, DATEDIFF(week, CONVERT(DATETIME, '2013-01-01 00:00:00', 102), JobDate) * 7 - 2, CONVERT(DATETIME, '2013-01-01 00:00:00', 102))
  
    GO
  </code></pre>
  
  <p>And the query is like:<br>
      </p>
  
  <pre><code>//Problem:This query will return two records but the two records are the same. 
  var jobAEWeeklyHistory = contextDjs.v_JobAEWeekly.Where(x =&gt; x.JobRegistryId == 11 &amp;&amp; x.JobDateWeekSeqStartDate &gt; date).ToList();
  </code></pre>