Lyra
Learn
AI Learning Platform
π Midnight
π Comfort
π₯ Ember
π Paper
β Contrast
Exams
Sign in to track progress
β Back to the lesson
Module 2 Β· Quiz
LINQ, Delegates, and Interfaces
1. What is the main reason for the database being hit multiple times in the given LINQ example?
Deferred execution causes queries to run each time they are enumerated
The query is incorrectly written and needs to be fixed
IQueryable does not support LINQ queries
There is a bug in the logging mechanism
2. What is the difference between IEnumerable and IQueryable in terms of execution location?
IEnumerable executes in memory and IQueryable executes in the database
Both execute in memory
Both execute in the database
IQueryable does not support LINQ queries
3. What type of method reference does a delegate represent in C#?
A reference with type safety
An unsafe reference
A reference to an event only
A reference to a global method
4. In what scenario would returning IEnumerable from a repository be the appropriate choice?
When the entire collection needs to be loaded in memory
When performance is not a concern
When lazy evaluation is desired for filtering data
When a method needs to return complex types
Submit answers
Continue: Modern Language Questions β
Review this lesson
Retake quiz