✅ How to write special linq group by? How to shorten my code?
I have function which named as
GetDepartmentsWithNested
. It returns Task<Dictionary<string, string>, IEnumerable<string>>
where first Item is children with path (doesn't matter) and second Item is some departments without any children.
Then I get subjects for Item1 and Item2 and fill dataSet with them. My problem: it looks ugly, 2 calls of function GetByDepartmentsIds
instead of just one
Let's see my code:
Okey, now we need to get subjects for Item2 with another grouping!
May someone help me with grouping these things, please?0 Replies