title: How do I perform a case-insensitive compare of GUIDs with LINQ?
body: <p>In the code below, I want to compare two GUIDs. The problem is I don't get any tasks returned because the GUIDS are different case (uppercase vs. lowercase). I need to perform a case-insensitive compare.</p>
  
  <pre><code>MembershipUser membershipUser = Membership.GetUser();
  string strUserId = membershipUser.ProviderUserKey.ToString();
  
  Guid userId = new Guid(strUserId.ToUpper());
  
  lblUserId.Text = userId.ToString();
  
  DataModelEntities dc = new DataModelEntities();
  
  var userTasks = dc.tasks.Where(t =&gt; t.user_id == userId).ToList();
  </code></pre>
  
  <p>How do I compare the GUIDs and find matches regardless of case?</p>
  
  <p>UPDATE 1
  now coverting the guid out of the membership provider to a GUID</p>
  
  <pre><code>Guid userId = (Guid) membershipUser.ProviderUserKey;
  </code></pre>
  
  <p>BUt I'm still not getting any matches.</p>