title: Returning a Distinct IQueryable with LINQ?
body: <p>I'm writing a Function that pulls Records from a DataBase using LINQ to get an IQueryable. This LINQ statement will pull all of the records for Active users within a certain time period, and then spit the UserID, First Name, and Last Name out to a Telerik RadGrid. </p>
  
  <p>My problem lies within trying to get a Distinct Value on the UserID when pulling this Data. I have tried re-working this code to get my result. Here is the an example of the code that is pulling all of the Data, with the Distinct NOT working.</p>
  
  <pre><code>public static IQueryable GetActiveEmployees_Grid(string Period)
  {
      DataContext Data = new DataContext();
      var Employees = (from c in DataSystem_Records
                       where c.Period == Period
                       orderby c.DataSystem_Employees.LName
                       select c).Distinct();
  
      return Employees;
  }
  </code></pre>
  
  <p>After applying the DataSource to my Grid, this returns the User 4 times, one instance for each Record for that Period.</p>
  
  <p><img src="https://i.stack.imgur.com/cu8z4.jpg" alt="alt text"></p>
  
  <p>Is there a way to apply Distinct to my LINQ Function to make this work the way I intend it to?</p>