Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumC#IEnumerable vs IQueryableSingle-choice MCQ

Given an IQueryable<T> sourced from a database, when does AsEnumerable() in the middle of a chain change behavior versus leaving it out?

dbContext.Orders .Where(o => o.Total > 100) .AsEnumerable() .Where(o => ExpensiveLocalCheck(o)) .ToList();