title: Guid.ToString() in Linq query?
body: <p>I have a method which attempts to pull a record from my db with a simple where clause. I have an issue because I'm passing in a string value and matching it to a Guid (uniqueIdentifier). I need the passed value as a string to bind in a DataGrid and I need the method to return a string.</p>
  
  <p>Obviously at run time, LinQ can't compile the query. The <code>.ToString()</code> method cannot be compiled into SQL. Any ideas?</p>
  
  <pre><code>private string getFileLocation(string LinkGuid)
  {
      try
      {
          ISESEntities context = new ISESEntities();
  
          string query = (from f in context.tbFileAttachments
                  where f.CCCPGUID.ToString() == LinkGuid
                  select f.FileLocation).First();
  
          return query;           
      }
      catch(Exception e)
      {
         blah blah
      }
  }
  </code></pre>