C# Querying With LINQ Querying the BirdWatcher Data Bird Importing

Aaron Selonke
Aaron Selonke
10,323 Points

Are the Birds in Workspaces the same as in the video?

Carling creates a sequence of Duplicates between the two lists. LoadBirds() and LoadImportedBirds()

I can't get the same result, and the returned duplicates that she gets like: 'Loggerhead Kingbird' or 'Common Cuckoo' do not exist in the BirdRepository.LoadImportedBirds() method found in Workspaces...???

 public static List<Bird> LoadImportedBirds()
            var birds = new List<Bird>();
            var utility = new RandomUtility();

            birds.Add(new Bird(utility, "Weaver", "Ibadan Malimbe", "Malimbus ibadanensis", 20, 33, 39.7, 1, "Yellow", "", "", "Nigeria", "Endangered", "EN"));
            birds.Add(new Bird(utility, "Hummingbird", "Bee Hummingbird", "Mellisuga helenae", 8, 10, 23, 2, "Blue", "Black", "", "Cuba", "NearThreatened", "NT"));
            birds.Add(new Bird(utility, "Sunbird", "Olive-bellied Sunbird", "Nectarinia chloropygia", 9, 14, 45, 1, "Green", "Red", "Black", "Angola|Benin|Burundi|Cameroon|Chad|Congo|Ethiopia|Gabon|Gambia|Ghana|Guinea|Kenya|Liberia|Mali|Nigeria|Rwanda|Senegal|Tanzania|Togo|Uganda", "Vulnerable", "VU"));
            birds.Add(new Bird(utility, "Hawk", "Mantled Hawk", "Pseudastur polionotus", 41.9, 78.7, 453.6, 0, "White", "Black", "", "Brazil|Paraguay|Uruguay", "NearThreatened", "NT"));
            birds.Add(new Bird(utility, "Finch", "Zebra Finch", "Taeniopygia guttata", 13, 16, 34, 1, "White", "Grey", "Black|Orange", "Australia|Puerto Rico|Portugal|Brazil|United States", "LeastConcern", "LC"));
            birds.Add(new Bird(utility, "Wren", "Niceforo's Wren", "Thryothorus nicefori", 28, 61, 170, 4, "Brown", "", "", "Colombia", "CriticallyEngandered", "CR"));
            birds.Add(new Bird(utility, "Flycatcher", "Black-and-white Monjita", "Xolmis dominicanus", 20, 23, 54, 1, "Black", "White", "", "Argentina|Brazil|Uruguay", "Vulnerable", "VU"));
            birds.Add(new Bird(utility, "Piper", "Yungas Manakin", "Chiroxiphia boliviana", 18, 25, 53, 4, "Black", "", "", "Peru|Bolivia", "LeastConcern", "LC"));
            birds.Add(new Bird(utility, "Heron", "Reddish Egret", "Egretta rufescens", 132, 230, 730, 1, "Red", "Brown", "", "Bahamas|United States|Mexico", "NearThreatened", "NT"));

1 Answer

Steven Parker
Steven Parker
162,981 Points

:warning: The downloads differ slightly from what is shown and used in the video.

I noticed the same thing when I QA'd the course, and reported it. :mailbox:

Carling Kirk
Carling Kirk
Treehouse Guest Teacher

Thanks for bringing this up again! Should be fixed now. :)