Skip to content

Commit

Permalink
Monday Morning Refactoration
Browse files Browse the repository at this point in the history
  • Loading branch information
AneMarlene committed Jun 17, 2024
1 parent a3d5e94 commit 5f91a36
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,11 @@ private List<BarChart> GetSpreadWaysIntroduction()

var uniqueIntroductionPathwaysPerSpecies = new List<string>();

var introductionPathwaysSpecies = _query.Select(y => new
{
introductionAndSpreadPathways = y.IntroductionAndSpreadPathways.Where(z => z.IntroductionSpread == AlienSpeciesAssessment2023IntroductionPathway.IntroductionSpread.Introduction).Select(z => z.Category).ToArray(),
id = y.Id
}).ToList();
var introductionPathwaysSpecies = _query.Select(y => y.IntroductionAndSpreadPathways.Where(z => z.IntroductionSpread == AlienSpeciesAssessment2023IntroductionPathway.IntroductionSpread.Introduction).Select(z => z.Category).ToArray()).ToList();

foreach (var id in introductionPathwaysSpecies)
foreach (var speciesPathways in introductionPathwaysSpecies)
{
var uniquePathways = id.introductionAndSpreadPathways.Distinct().ToList();
var uniquePathways = speciesPathways.Distinct().ToList();
uniqueIntroductionPathwaysPerSpecies.AddRange( uniquePathways );
};

Expand Down

0 comments on commit 5f91a36

Please sign in to comment.