C#C
C#3y ago
Yashogi

LInq Combine duplicates

Hey everyone, trying to figure out how to combine my dates together so that it doesn't separate the data.
This is what I am currently working with
    Stores
        .Select(x => new
        {
            City = x.City,
            Location = x.Location,
            Sales = Orders.Where(o => x.StoreID == o.StoreID && o.OrderDate.Month == 12).OrderBy(o => o.OrderDate.Day)
            .Select (s => new 
            {
                Date = s.OrderDate,
                ProductSales = s.SubTotal,
                GST = s.GST
            })
        }).Dump();
remove_dupes.png
Was this page helpful?