title: nature of SELECT query in MVC and LINQ TO SQL
body: <p>i am bit confused by the nature and working of query , I tried to access database which contains each name more than once having same EMPid so when i accessed it in my DROP DOWN LIST then same repetition was in there too so i tried to remove repetition by putting DISTINCT in query but that didn't work but later i modified it another way and that worked but <strong>WHY THAT WORKED, I DON'T UNDERSTAND ?</strong></p>
  
  <p>QUERY THAT DIDN'T WORK</p>
  
  <pre><code> var names = (from n in DataContext.EmployeeAtds select n).Distinct();
  </code></pre>
  
  <p>QUERY THAT WORKED of which i don't know how ?</p>
  
  <pre><code>var names = (from n in DataContext.EmployeeAtds select new {n.EmplID, n.EmplName}).Distinct();
  </code></pre>
  
  <p>why 2nd worked exactly like i wanted (picking each name 1 time)</p>
  
  <p>i'm using mvc 3 and linq to sql and i am newbie.</p>