title: Custom SQL functions and Code First (EF 4.1)
body: <p>I'm using <strong>Entity Framework 4.1 RC</strong> and code first approach.
  <strong>How can I call custom SQL functions?</strong></p>
  
  <p>If I use <em>EdmFunction</em> attribute, what namespace should I specify?</p>
  
  <pre><code>[EdmFunction("Namespace", "GetAge")] 
  public static int GetAge(Person p) 
  {  
      throw new NotSupportedException(…); 
  }
  </code></pre>
  
  <p>When I try to execute a LINQ query with such function the following exception is thrown:</p>
  
  <blockquote>
    <p>The specified method '...' on the type
    '...' cannot be translated into a LINQ to
    Entities store expression.</p>
  </blockquote>