I'm new in ASP.NET MVC. Now, I've searched in the internet what does the .toList()
do.
Using ToList() method to force LINQ query execute immediately
calling ToList() method, you force LINQ to execute immediately and return actual results.
But what's the difference between these two.
return View(db.Items)
and return View(db.Items.ToList())
Because I can still see the same result in my page.