ptran123/Conceptual — comment on commit c670e5543b4e82d51e677bf64c9f1fbcbdf8664f
File: MvcCodeFirstSolution/MvcCodeFirst/Areas/Public/Views/Home/Index.cshtml line 1
By ptran123:

We got to think again if we should use IQuerable in the view. The reason why is because we want to deliver to the view a model or viewModel that is already present in memory. That is why the controller should do a .ToList() on the model before giving to the view. The view takes the in-memory model, and renders as needed. In the case above, when you call Model.any(), then the sql statement is called at that time (due to the lazy execution architecture of using IQueryable. Not what we want the view to do here.