FAQs on the exercise Add a Continent Select Box to the Filter
There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
You can also find further discussion and get answers to your questions over in Language Help.
Agree with a comment or answer? Like () to up-vote the contribution!
Hello @hfakenamington I also had the same problem with this, the only way to pass this lesson is to view the solution. I have submitted MULTIPLE bug reports but I have not gotten a reply back from Codecademy!!!
I pass the #3, it works ok but i stuck on 5th. this is already second time when I came a cross with this problem (first time was in Data Models Lesson, so I just leave it unfinished).
Same for me!
I’ve double check the solution but it’s the same code like mine, and still I can’t pass the task. I stuck on 5th part (where need to add and
Same thing for me on #5. I’ve compared my code and it’s identical to the solution and it’s still asking me if I added the label. I’ve even copied their solution to my stuff and it won’t work. I’m feeling like I wasted money on my Pro subscription.
The exercise should begin by clearly explaining what we’re doing and how we’re going to do it, so the rest of the exercise isn’t just one big confusion.
LINQ is used to gather all continents while sorting then alphabetically:
IQueryable<string> continentQuery = from c in _context.Continents orderby c.ID select c.ID;
This is the first time we’ve seen IQueryable<string>, at least in this lesson, and there is no explanation of why we’re using it here.
The result of the query is assigned to a SelectList component during OnGetAsync(). The component adds the All option as part of the markup.
Missing code showing this. We should understand this before moving on to the instructions.
Return the query to the SelectList each time the page does a get.
Continents = new SelectList(await continentQuery.ToListAsync());
What?? You have not explained what the terminology “Return the query” means.
For reference, “In C# and other programming languages that support LINQ (Language Integrated Query), returning a query usually means returning an IQueryable or IEnumerable object that represents a query against a data source, such as a database.”
I agree, alot of concepts in this chapter are not explained well (or at all) and I feel as though they expect me to just copy the code in the hints and move on. I am hoping that there are projects later on in the course that bring everything together.