I created a simple WPF project using Relativity Server and PCTrade database.
Using the statement below:
dataGrid.ItemsSource = new DataModule().DataAdapter.GetTable().GroupBy(it => it.Birthdate.Value.Month).Select(it => new { it.Key, Cnt = it.Count() });
the output data was not grouped on month (it seems that grouping occurs on the full date and not only on the month). I tried the same linq query on another project based on entity framework and it works as expected.
Unfortunately DateTime methods and properties like .Month, .Day, etc are calculated client-side. They cannot be used as a part of where or groupby conditions.
You mean that Data Abstract/Relativity Server is not able to perform that or it’s unlikely to do that?
For example, entity framework can translate that tree in a sql query with correct “group by” clause.
Actually, I can provide you a sample with workaround for this ‘Group By Month’ thing. Also I’ll take a deeper look to check if it is possible to add support for datepart methods in group conditions in a reasonable time. Will that work for you?