-
-
Save mahizsas/5814302 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var chartData = from log in _contextProvider.Context.Logs | |
group log by new | |
{ | |
ApplicationName=log.Application.Name, | |
Year= SqlFunctions.DatePart("Year", log.Timestamp), | |
Month= SqlFunctions.DatePart("Month",log.Timestamp) | |
} | |
into logsPerApplication | |
select new | |
{ | |
Count = logsPerApplication.Count(), | |
logsPerApplication.Key.ApplicationName, | |
logsPerApplication.Key.Year, | |
logsPerApplication.Key.Month | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment