Last active
July 13, 2021 04:03
-
-
Save kgamecarter/271414f75784ef117f7035784ff9625a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var list = result.Date | |
.GroupBy(x => new { x.City_Id, x.City_Name, x.Region_Id, x.Region_Name }) | |
.GroupBy(g1 => new { g1.Key.City_Id, g1.Key.City_Name }) | |
.Select(g2 => new StoreAddressModel() | |
{ | |
City_Id = g2.Key.City_Id, | |
City_Name = g2.Key.City_Name, | |
Region = g2.Select(g1 => new Region() | |
{ | |
Region_Id = g1.Key.Region_Id, | |
Region_Name = g1.Key.Region_Name, | |
Vendor = g1.Select(x => new Vendor() | |
{ | |
Vendor_Id = x.Vendor_Id, | |
Vendor_nme = x.Vendor_nme | |
}).ToList() | |
}).ToList() | |
}).ToList(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment