When i am using the aggregate function the grouping an filtering slows down quite it bit. Is there anyway that the performance can be achieved so that it doesnt slow down as much it is currently. Also it becomes unresponsive during this period.
PS: The aggregate function is a complicated one
var aggregate =
AggregationExpression = models => models.Where(x => x.flag !=
).Select(x => x.period.Where(y => y.date == currentDate).Select(d => d.allocation).Sum()).Sum()/100