Alice52 / c-tutorial

The repository is about c, including c, csharp, cpp.
MIT License
0 stars 0 forks source link

[linq] join #1

Open Alice52 opened 4 years ago

Alice52 commented 4 years ago
Alice52 commented 3 years ago
Dictionary<int?, double> dataDic = new Dictionary<int?, double>();
dataDic = item.RecordDetail
            .GroupBy(p => p.ApplicationPeriodStartTime?.Month)
            .ToDictionary(g => g.Key, g => g.Sum(p => p.RealOverTimeNum));