Group by hour in IQueryable
问题 In my project I receive some data from an SPS all x seconds. Every y minutes I archive the current Data in a database so I'm able to show statistics. The data I receive gets put in a model. Something like this but much more complex: public class Data { public DateTime ArchiveTime { get; set; } public float TempC { get; set; } public float CO2Percent { get; set; } } I have a repository for the database that returns all entries in a certain time span. See this code: // Context is my DbContext