Web developers can create and call a method inline based on LINQ expression. For example they can create a function named TestClient() that examines a client an return true or false based on whether they want to include it in the results:

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition
ASP.NET Core 3 and Angular 9: Full stack web development with .NET Core 3.1 and Angular 9, 3rd Edition
C# in Depth, 4th Edition

 

private bool TestClient(Client client)

{

return client.LastName.StartsWith(“T”);

}

 

Web developers could use the TestClient method like this:

 

var matches = from client in clients

where TestClient(client)

select client;