title: How to do Guid.TryParse in Linq query
body: <p>I have a linq query like:</p>
  
  <pre><code>from rd in registrantContext.RegistrantData
  join c in registrantContext.Components    
  ...
  select new
  {
      RegistrantID = r.SortingId,
      FieldID = c.SortingId,
      FieldValue = (!Guid.TryParse(rd.Value, out guidValue) || string.IsNullOrEmpty(rd.Value)) ? rd.Value :
          (c is IComponentItemParent) ? (c as IComponentItemParent).Children.FirstOrDefault(i =&gt; i.UId == guidValue).LabelText : rd.Value,
  ...
  }
  </code></pre>
  
  <p>But I got error:</p>
  
  <blockquote>
    <p>LINQ to Entities does not recognize the method 'Boolean
    TryParse(System.String, System.Guid ByRef)' method, and this method
    cannot be translated into a store expression.</p>
  </blockquote>
  
  <p>I'd like to know how to do Guid.TryParse the linq query, perhaps like SqlFunctions.</p>