title: Only primitive types or enumeration types are supported in this context- linq join
body: <p>I am getting this error when I try to join </p>
  
  <pre><code>var users = _users.Get();
  var userApprovals =
  (from approval in _entities.ApprovalEntities
  join userDetail in users on approval.UserKey equals userDetail.UserId
   where approval.EmployeeUid == employeeUid
   select new UserApproval
  {
  Id = approval.Id,
  EmployeeUid = approval.EmployeeUid,
  UserKey = approval.UserKey,
  UserId = approval.UserId,
  UserName = userDetail.FirstName + " " + userDetail.LastName
  }).ToList();
  </code></pre>
  
  <p>error 
  Only primitive types or enumeration types are supported in this context</p>
  
  <p>Thanks</p>