title: Entity Framework 6 ToString(), formatting (DateTime format), query intercept
body: <p>I`m not found correct way to search with linq2sql in DateTime (DateTime?) fields. </p>
  
  <pre class="lang-cs prettyprint-override"><code>db.Items.Where(x =&gt; x.DateTime1.ToString().Contains("2014.08"))
  </code></pre>
  
  <p>Not work, because in linq2sql create <strong>CAST([XXXX.DateTime1] AS NVARCHAR(MAX)) = '04 Aug 2014' NOT 2014.08</strong></p>
  
  <p>I try use custom function mapping, but no result</p>