Skip to content

Commit 5acde11

Browse files
CopilotBillWagner
andcommitted
Update lambda expression documentation to clarify method call behavior in expression trees
Co-authored-by: BillWagner <[email protected]>
1 parent ef6e4ed commit 5acde11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/csharp/language-reference/operators/lambda-expressions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ A lambda expression with an expression on the right side of the `=>` operator is
4949
(input-parameters) => expression
5050
```
5151

52-
The body of an expression lambda can consist of a method call. However, when creating [expression trees](../../advanced-topics/expression-trees/index.md) evaluated by a query provider, limit method calls to those methods recognized by the query provider. Otherwise, the query provider can't replicate the method's function.
52+
The body of an expression lambda can consist of a method call. However, when creating [expression trees](../../advanced-topics/expression-trees/index.md) evaluated by a query provider, you should limit method calls to those methods that the query provider can handle. Different query providers have varying capabilitiesfor example, many SQL-based providers can translate methods like <xref:System.String.StartsWith%2A?displayProperty=nameWithType> into appropriate SQL expressions such as `LIKE`. If a query provider doesn't recognize a method call, it can't translate or execute the expression.
5353

5454
## Statement lambdas
5555

0 commit comments

Comments
 (0)