title: Why my Linqued query is not giving me proper result?
body: <p>I have this sql query which gives me proper result i.e all the names of employee sorted by A to Z using order by clause</p>
  
  <pre><code>select Distinct(EmpNTLogin),Employee from Attendance 
  where  CreateDate&gt;='2016-01-01'
  order by EmpNTLogin
  </code></pre>
  
  <p>when I converted the same query in Linq,I am getting the right result but order  by clause is not working.
  here is my Linqued Query</p>
  
  <pre><code>    var query = (from attendance in db.Attendances
                       orderby attendance.EmpNTLogin
                       where attendance.CreateDate.Value.Year &gt;= 2016
                       select new { attendance.Employee, attendance.EmpNTLogin }).Distinct();
  </code></pre>