title: EntityFramework 6.1.3 and MySQL DbFunctions.TruncateTime does not exist?
body: <p>Trying to get a count of things entered today using this query.</p>
  
  <pre><code>var today = DateTime.Today;
  var unitsPassedToday = await this.db.Sessions
          .Where(x =&gt; DbFunctions.TruncateTime(x.FinishTime) == today)
          .CountAsync();
  </code></pre>
  
  <p>Getting the following exception:</p>
  
  <pre><code>FUNCTION db.TruncateTime does not exist
  </code></pre>
  
  <p>I swear I've used this function before. I do not have any references to System.Data.Entity, which is the only solution I've found using a Google search. Is this some kind of bug with the MySQL implementation of EntityFramework? Obviously I could just write a stored procedure that returns this information, but I kinda wanna know why this isn't working?</p>
  
  <p>MySQL server is 5.5.23-enterprise.</p>
  
  <p>Feeling kinda dumb right now, seems like this should be a simple problem and I'm just overlooking something simple...</p>
  
  <p>Edit:</p>
  
  <p>Here is the SQL Entity Framework generates...</p>
  
  <pre><code>SELECT
  `GroupBy1`.`A1` AS `C1`
  FROM (SELECT
  COUNT(1) AS `A1`
  FROM `sessions` AS `Extent1`
  WHERE (TruncateTime(`Extent1`.`finish_time`)) = @p__linq__0) AS `GroupBy1`
  </code></pre>
  
  <p>I'm pretty sure TruncateTime isn't a valid MySQL function, why would it be calling that? I guess I should also add I'm using EDMX diagrams and not code first. I have added the codeConfigurationType in my web.config to target MySQL though...</p>
  
  <pre><code>&lt;entityFramework codeConfigurationType="MySql.Data.Entity.MySqlEFConfiguration, MySql.Data.Entity.EF6"&gt;
  </code></pre>
  
  <p>MySql.Data.Entity is version 6.9.6.0</p>