In my project (ASP.net MVC) i have to return the name of a function (CSV File i read in) in lowercase. Becaus
you can use pre-defined function string.ToLower() like this,
var descItemsStamp = db.ChartDatas
.GroupBy(x => new { x.Function });
var descItems = descItemsStamp
.Select(x => new DescFunctionDataDTO
{
function = x.Select(b => b.Function.ToLower()).Distinct(),
functionavg = Math.Round(x.Average(y => y.Duration), 2),
})
.OrderByDescending(x => x.functionavg)
.ToList();
return descItems;