.net - How to Convert LINQ Comprehension Query Syntax to Method Syntax using Lambda -
is there tool, process or solution convert following linq query syntax method syntax lambdas (dot notation)? expect solution convert following query syntax method syntax such this.
var filteredemployees = employee in allemployees employee.departmentid < 4 && employee.employeeid < 10 orderby employee.departmentid descending, employee.lastname descending select employee;
to following
var filteredemployees2 = allemployees.where(employee => ((employee.departmentid < 4) && (employee.employeeid < 10))) .orderbydescending(employee => employee.departmentid) .thenbydescending(employee => employee.lastname);
i'm use learn method syntax better.
linqpad tool need. "stole" following screenshot website better illustrate how works. if write query using linq syntax can click on button highlighted in red see equivalent lambda syntax:
Comments
Post a Comment