title: Teradata .NET provider code first fiasco - Entity Functions not supported
body: <p>Alright. I worked so hard over the past few weeks to learn the .NET data provider for teradata and set up an infrastructure to query Teradata data sources. Everything is great except....</p>
  
  <p>Canonical Entity functions are not supported by the provider. Alright. Then I look at the link below which says I should use "Teradata.DiffDays" and "EntityFunctions.DiffDays". </p>
  
  <p><a href="http://developer.teradata.com/doc/connectivity/tdnetdp/14.10/webhelp/EntityProviderCanonicalFunctions.html" rel="nofollow">http://developer.teradata.com/doc/connectivity/tdnetdp/14.10/webhelp/EntityProviderCanonicalFunctions.html</a></p>
  
  <p>I merrily try to use "Teradata.DiffDays" in my LINQ to Entities query thusly:</p>
  
  <p>var results = IMAccts.Where(acct => acct.ACCT_CLSD_DT != null &amp;&amp; Teradata.DiffDays(ACCT_OPEN_DT, ACCT_CLSD_DT) >= 90).Dump();</p>
  
  <p>The type or namespace name 'DiffDays' does not exist in the namespace 'Teradata'.</p>
  
  <p>However, I observe that the same Teradata.DiffDays can be used in Entity SQL like this:</p>
  
  <p>select Teradata.DiffDays(ACCT_OPEN_DT,ACCT_CLSD_DT) as diff from IMAccts</p>
  
  <p>My questions are: </p>
  
  <p>1) How is it possible that the function under the "Teradata" namespace is recognized in Entity SQL and not in LINQ to Entities? </p>
  
  <p>2) Is it possible for me to work around this by supplying my own DateDiff function? (Please note that collecting the data locally and then applying date manipulation is definitely not an option)</p>