Yes, where is the lazy version of findall. FindAll () is a function of type List, it is not a LINQ extension method, such as Where. The FindAll method in List, which is an instance method that returns a new List with the same element type. FindAll can only be used on List instances, while LINQ extension methods work on any type that implements IEnumerable.
The main difference (in addition to being implemented on: IEnumerable vs. List) is that Where implements deferred execution, where it actually doesn't search until you need it (using it in a foreach loop, for example ) FindAll is an immediate execution method.
I will refer to a data structure called an expression tree to understand deferred execution, you only need to understand that the expression tree is a data structure, such as a list or a queue. It contains a LINQ to SQL query, not the query results, but the actual elements of the query itself.
To understand the Where Work, we need to see that if we write code
var query = from customer in db.Customers where customer.City == "Paris" select customer;
The request is not executed here, while it is executed in the foreach loop
To understand LINQ and delayed execution
Shweta pathak
source share