title: How to get Unique records via LINQ
body: <pre><code>var EmpRecList = (from ur in db.Users
    join ug in db.UserGroups on ur.UserGroupID equals ug.UserGroupID
    select new
    {
        lastName = ur.LastName, 
        userID = ur.UserID,
        firstName = ur.FirstName,
        userGroupName = ug.UserGroupNameLang1
    }).Where(oh =&gt; oh.userGroupName.StartsWith(userCur.UserGroupName))
                                    .OrderBy(x =&gt; x.lastName);
  </code></pre>
  
  <p>I have this code snippet. The problem here is, im getting 2 records with the same user ID. I would like to have a distinct record based on the User ID. Thanks. Tried using distinct method but no success.</p>