This question is locked. New answers and comments are not allowed.
Dear all,
in an entity i have two Properties.
* ProductLine
* ProductLineDisplay
ProductLine is stored in the db, ProductLineDisplay returns a string only.
Now I like to group by ProductLine (because if I group by ProductLineDisplay an exception is raised) and display the ProductLineDisplay property. How is this possible?
var result = from o in Context.StatisticOrders join ol in Context.StatisticOrderLines on o.Id equals ol.StatisticOrderId where o.Date >= start && o.Date <= end && o.AddressId == address group ol by ol.ProductLine into gr select new SalesChart { ProductLine = gr.Key.ToString(), ProductLineDisplay = ? Sales = gr.Sum(x => x.Price) };Thank you,
Manuel