Skip to content

Commit 16a23f6

Browse files
CopilotBillWagner
andauthored
Update lambda expression documentation to clarify method call behavior in expression trees (#47037)
* Initial plan * Update lambda expression documentation to clarify method call behavior in expression trees Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> * Update docs/csharp/language-reference/operators/lambda-expressions.md --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
1 parent 39b82a0 commit 16a23f6

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 translates to its format. 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)