title: DbFunctions.TruncateTime LINQ equivalent in EF CORE
body: <p>I have the following functioning LINQ in my .net app </p>
  
  <pre><code>    public ActionResult Index()
      {
          Dictionary&lt;DateTime?, List&lt;Event&gt;&gt; result;
          result = (from events in db.Events.Include("Activity")
                        where events.IsActive
                        group events by DbFunctions.TruncateTime(events.DateTimeFrom) into dateGroup
                        select new { EventDate = dateGroup.Key, Events = dateGroup.ToList() }).ToDictionary(x =&gt; x.EventDate, x =&gt; x.Events);
  
          return View(result);
      }
  </code></pre>
  
  <p>When I use this in EF Core, I can't use DbFunctions. How can I rewrite this to make it work in Microsoft.EntityFrameworkCore ? I am using SQLite if that makes a difference. </p>