From 22c1cf58914c55ba915f2c6aabc834126cc9f913 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Wed, 29 May 2024 11:26:10 -0400 Subject: [PATCH 1/5] Add note on enumerable collections Fixes #40541 Add an include note for all samples in this section. Point out that all use `IEnumerable` based collections, so some restrictions will apply when an `IQueryable` source is used, and expressions are created. Also, point out that each `IQueryProvider` has unique restrictions. Finally, update the left join method syntax sample to use `SelectMany` which is closer to the lowered code. --- .../standard-query-operators/converting-data-types.md | 4 +++- .../linq/standard-query-operators/filtering-data.md | 4 +++- .../linq/standard-query-operators/grouping-data.md | 4 +++- .../standard-query-operators/includes/linq-syntax.md | 10 ++++++++++ docs/csharp/linq/standard-query-operators/index.md | 4 +++- .../linq/standard-query-operators/join-operations.md | 4 +++- .../linq/standard-query-operators/partitioning-data.md | 4 +++- .../standard-query-operators/projection-operations.md | 4 +++- .../standard-query-operators/quantifier-operations.md | 4 +++- .../linq/standard-query-operators/set-operations.md | 4 +++- .../standard-query-operators/LeftOuterJoins.cs | 10 +++++----- .../linq/standard-query-operators/sorting-data.md | 4 +++- 12 files changed, 45 insertions(+), 15 deletions(-) create mode 100644 docs/csharp/linq/standard-query-operators/includes/linq-syntax.md diff --git a/docs/csharp/linq/standard-query-operators/converting-data-types.md b/docs/csharp/linq/standard-query-operators/converting-data-types.md index d6ce5d834ddd8..eea9af0edff62 100644 --- a/docs/csharp/linq/standard-query-operators/converting-data-types.md +++ b/docs/csharp/linq/standard-query-operators/converting-data-types.md @@ -1,12 +1,14 @@ --- title: "Converting Data Types" description: Conversion methods change the type of input objects. See conversion operations in LINQ queries in C#, such as Enumerable.AsEnumerable and Enumerable.OfType. -ms.date: 02/14/2024 +ms.date: 05/29/2024 --- # Converting Data Types (C#) Conversion methods change the type of input objects. +[!INCLUDE [Prerequisites](../includes/linq-syntax.md)] + Conversion operations in LINQ queries are useful in various applications. Following are some examples: - The method can be used to hide a type's custom implementation of a standard query operator. diff --git a/docs/csharp/linq/standard-query-operators/filtering-data.md b/docs/csharp/linq/standard-query-operators/filtering-data.md index 65c497fb2f417..531de762d70e3 100644 --- a/docs/csharp/linq/standard-query-operators/filtering-data.md +++ b/docs/csharp/linq/standard-query-operators/filtering-data.md @@ -1,12 +1,14 @@ --- title: "Filtering Data with LINQ" description: Filtering, also known as selection, restricts results based on a condition. Learn about the standard query operator methods in LINQ in C# that perform filtering. -ms.date: 02/14/2024 +ms.date: 05/29/2024 --- # Filtering Data in C# with LINQ Filtering refers to the operation of restricting the result set to contain only those elements that satisfy a specified condition. It's also referred to as *selecting* elements that match the specified condition. +[!INCLUDE [Prerequisites](../includes/linq-syntax.md)] + The following illustration shows the results of filtering a sequence of characters. The predicate for the filtering operation specifies that the character must be 'A'. :::image type="content" source="./media/filtering-data/linq-filter-operation.png" alt-text="Diagram that shows a LINQ filtering operation"::: diff --git a/docs/csharp/linq/standard-query-operators/grouping-data.md b/docs/csharp/linq/standard-query-operators/grouping-data.md index d457ae1d656b7..fc5bf1e607c96 100644 --- a/docs/csharp/linq/standard-query-operators/grouping-data.md +++ b/docs/csharp/linq/standard-query-operators/grouping-data.md @@ -1,7 +1,7 @@ --- title: "Grouping Data" description: Grouping puts data into groups of elements that share an attribute. Learn about the standard query operator methods in LINQ in C# that group data elements. -ms.date: 02/16/2024 +ms.date: 05/29/2024 --- # Grouping Data (C#) @@ -9,6 +9,8 @@ Grouping refers to the operation of putting data into groups so that the element :::image type="content" source="./media/grouping-data/linq-group-operation.png" alt-text="Diagram that shows a LINQ Grouping operation"::: +[!INCLUDE [Prerequisites](../includes/linq-syntax.md)] + The standard query operator methods that group data elements are listed in the following table. |Method Name|Description|C# Query Expression Syntax|More Information| diff --git a/docs/csharp/linq/standard-query-operators/includes/linq-syntax.md b/docs/csharp/linq/standard-query-operators/includes/linq-syntax.md new file mode 100644 index 0000000000000..3eb4b0b69f6c7 --- /dev/null +++ b/docs/csharp/linq/standard-query-operators/includes/linq-syntax.md @@ -0,0 +1,10 @@ +--- +author: BillWagner +ms.author: wiwagn +ms.topic: include +ms.date: 05/29/2024 +--- + +> [!IMPORTANT] +> +> These samples use a data source. Data sources based on use data sources and [expression trees](../../../advanced-topics/expression-trees/index.md). Expression trees have [limitations](../../../advanced-topics/expression-trees/index.md#limitations) on the allowed C# syntax. Furthermore, each `IQueryProvider` data source, such as [EF Core](/ef/core/querying/complex-query-operators) may impose more restrictions. Check the documentation for your data source. diff --git a/docs/csharp/linq/standard-query-operators/index.md b/docs/csharp/linq/standard-query-operators/index.md index 341c5858a1929..7478e91c4499a 100644 --- a/docs/csharp/linq/standard-query-operators/index.md +++ b/docs/csharp/linq/standard-query-operators/index.md @@ -1,12 +1,14 @@ --- title: "Standard Query Operators Overview" description: The LINQ standard query operators provide query capabilities including filtering, projection, aggregation, and sorting in C#. -ms.date: 02/16/2024 +ms.date: 05/29/2024 --- # Standard Query Operators Overview The *standard query operators* are the keywords and methods that form the LINQ pattern. The C# language defines [LINQ query keywords](../../language-reference/keywords/query-keywords.md) that you use for the most common query expression. The compiler translates expressions using these keywords to the equivalent method calls. The two forms are synonymous. Other methods that are part of the namespace don't have equivalent query keywords. In those cases, you must use the method syntax. This section covers all the query operator keywords. The runtime and other NuGet packages add more methods designed to work with LINQ queries each release. The most common methods, including those that have query keyword equivalents are covered in this section. For the full list of query methods supported by the .NET Runtime, see the API documentation. In addition to the methods covered here, this class contains methods for concatenating data sources, computing a single value from a data source, such as a sum, average, or other value. +[!INCLUDE [Prerequisites](../includes/linq-syntax.md)] + Most of these methods operate on sequences, where a sequence is an object whose type implements the interface or the interface. The standard query operators provide query capabilities including filtering, projection, aggregation, sorting and more. The methods that make up each set are static members of the and classes, respectively. They're defined as [*extension methods*](../../programming-guide/classes-and-structs/extension-methods.md) of the type that they operate on. The distinction between and sequences determines how the query is executed at runtime. diff --git a/docs/csharp/linq/standard-query-operators/join-operations.md b/docs/csharp/linq/standard-query-operators/join-operations.md index e82c1cd69ee84..ca9a473936674 100644 --- a/docs/csharp/linq/standard-query-operators/join-operations.md +++ b/docs/csharp/linq/standard-query-operators/join-operations.md @@ -1,13 +1,15 @@ --- title: "Join Operations" description: A join of two data sources associates objects with objects that share an attribute across data sources. Learn about join methods in the LINQ framework in C#. -ms.date: 02/16/2024 +ms.date: 05/29/2024 no-loc: [Join, GroupJoin] --- # Join Operations in LINQ A *join* of two data sources is the association of objects in one data source with objects that share a common attribute in another data source. +[!INCLUDE [Prerequisites](../includes/linq-syntax.md)] + Joining is an important operation in queries that target data sources whose relationships to each other can't be followed directly. In object-oriented programming, joining could mean a correlation between objects that isn't modeled, such as the backwards direction of a one-way relationship. An example of a one-way relationship is a `Student` class that has a property of type `Department` that represents the major, but the `Department` class doesn't have a property that is a collection of `Student` objects. If you have a list of `Department` objects and you want to find all the students in each department, you could use a join operation to find them. The join methods provided in the LINQ framework are and . These methods perform equijoins, or joins that match two data sources based on equality of their keys. (For comparison, Transact-SQL supports join operators other than `equals`, for example the `less than` operator.) In relational database terms, implements an inner join, a type of join in which only those objects that have a match in the other data set are returned. The method has no direct equivalent in relational database terms, but it implements a superset of inner joins and left outer joins. A left outer join is a join that returns each element of the first (left) data source, even if it has no correlated elements in the other data source. diff --git a/docs/csharp/linq/standard-query-operators/partitioning-data.md b/docs/csharp/linq/standard-query-operators/partitioning-data.md index d197afd81cbc7..f1e8252813a99 100644 --- a/docs/csharp/linq/standard-query-operators/partitioning-data.md +++ b/docs/csharp/linq/standard-query-operators/partitioning-data.md @@ -1,12 +1,14 @@ --- title: "Partitioning data" description: Learn how to partition data in LINQ. View an illustration showing the results of partitioning operations. -ms.date: 02/14/2024 +ms.date: 05/29/2024 --- # Partitioning data (C#) Partitioning in LINQ refers to the operation of dividing an input sequence into two sections, without rearranging the elements, and then returning one of the sections. +[!INCLUDE [Prerequisites](../includes/linq-syntax.md)] + The following illustration shows the results of three different partitioning operations on a sequence of characters. The first operation returns the first three elements in the sequence. The second operation skips the first three elements and returns the remaining elements. The third operation skips the first two elements in the sequence and returns the next three elements. :::image type="content" source="./media/partitioning-data/linq-partitioning-operations.png" alt-text="Illustration that shows three LINQ partitioning operations."::: diff --git a/docs/csharp/linq/standard-query-operators/projection-operations.md b/docs/csharp/linq/standard-query-operators/projection-operations.md index 3f938bce84dc8..388f423b460d1 100644 --- a/docs/csharp/linq/standard-query-operators/projection-operations.md +++ b/docs/csharp/linq/standard-query-operators/projection-operations.md @@ -1,12 +1,14 @@ --- title: "Projection operations in LINQ" description: Learn about projection operations. These operations transform an object into a new form that often consists only of properties used later. -ms.date: 02/14/2024 +ms.date: 05/29/2024 --- # Projection operations (C#) Projection refers to the operation of transforming an object into a new form that often consists only of those properties subsequently used. By using projection, you can construct a new type that is built from each object. You can project a property and perform a mathematical function on it. You can also project the original object without changing it. +[!INCLUDE [Prerequisites](../includes/linq-syntax.md)] + The standard query operator methods that perform projection are listed in the following section. ## Methods diff --git a/docs/csharp/linq/standard-query-operators/quantifier-operations.md b/docs/csharp/linq/standard-query-operators/quantifier-operations.md index f35dcfae2b4a9..77bbede69a9bf 100644 --- a/docs/csharp/linq/standard-query-operators/quantifier-operations.md +++ b/docs/csharp/linq/standard-query-operators/quantifier-operations.md @@ -2,12 +2,14 @@ title: "Quantifier Operations" titleSuffix: LINQ description: Learn about quantifier operations in LINQ. These methods, `All`, `Any`, and `Contains`, return a Boolean value indicating whether some or all elements in a sequence satisfy a condition. -ms.date: 02/14/2024 +ms.date: 05/29/2024 --- # Quantifier operations in LINQ (C#) Quantifier operations return a value that indicates whether some or all of the elements in a sequence satisfy a condition. +[!INCLUDE [Prerequisites](../includes/linq-syntax.md)] + The following illustration depicts two different quantifier operations on two different source sequences. The first operation asks if any of the elements are the character 'A'. The second operation asks if all the elements are the character 'A'. Both methods return `true` in this example. :::image type="content" source="./media/quantifier-operations/linq-quantifier-operations.png" alt-text="LINQ Quantifier Operations"::: diff --git a/docs/csharp/linq/standard-query-operators/set-operations.md b/docs/csharp/linq/standard-query-operators/set-operations.md index 25290a1b9451c..095a01a015fa3 100644 --- a/docs/csharp/linq/standard-query-operators/set-operations.md +++ b/docs/csharp/linq/standard-query-operators/set-operations.md @@ -1,12 +1,14 @@ --- title: "Set operations" description: Learn about set operations and the standard query operator methods that perform set operations in LINQ in C#. -ms.date: 01/22/2024 +ms.date: 05/29/2024 --- # Set operations (C#) Set operations in LINQ refer to query operations that produce a result set based on the presence or absence of equivalent elements within the same or separate collections. +[!INCLUDE [Prerequisites](../includes/linq-syntax.md)] + | Method names | Description | C# query expression syntax | More information | |--|--|--|--| | `Distinct` or `DistinctBy` | Removes duplicate values from a collection. | Not applicable. |


| diff --git a/docs/csharp/linq/standard-query-operators/snippets/standard-query-operators/LeftOuterJoins.cs b/docs/csharp/linq/standard-query-operators/snippets/standard-query-operators/LeftOuterJoins.cs index 58dfbe6c68669..f731433a071ab 100644 --- a/docs/csharp/linq/standard-query-operators/snippets/standard-query-operators/LeftOuterJoins.cs +++ b/docs/csharp/linq/standard-query-operators/snippets/standard-query-operators/LeftOuterJoins.cs @@ -37,12 +37,12 @@ private static void LeftOuterJoinMethodSyntax() { // var query = students.GroupJoin(departments, student => student.DepartmentID, department => department.ID, - (student, department) => new { student, subgroup = department.DefaultIfEmpty() }) - .Select(gj => new + (student, departmentList) => new { student, subgroup = departmentList.AsQueryable() }) + .SelectMany(joinedSet => joinedSet.subgroup, (student, department) => new { - gj.student.FirstName, - gj.student.LastName, - Department = gj.subgroup?.FirstOrDefault()?.Name ?? string.Empty + student.student.FirstName, + student.student.LastName, + Department = department.Name }); foreach (var v in query) diff --git a/docs/csharp/linq/standard-query-operators/sorting-data.md b/docs/csharp/linq/standard-query-operators/sorting-data.md index c96463cd43f60..e5dbc626589de 100644 --- a/docs/csharp/linq/standard-query-operators/sorting-data.md +++ b/docs/csharp/linq/standard-query-operators/sorting-data.md @@ -1,12 +1,14 @@ --- title: "Sorting Data" description: Learn about sort operations and the standard query operator methods that perform sort operations in LINQ in C#. -ms.date: 01/22/2024 +ms.date: 05/29/2024 --- # Sorting Data (C#) A sorting operation orders the elements of a sequence based on one or more attributes. The first sort criterion performs a primary sort on the elements. By specifying a second sort criterion, you can sort the elements within each primary sort group. +[!INCLUDE [Prerequisites](../includes/linq-syntax.md)] + The following illustration shows the results of an alphabetical sort operation on a sequence of characters: :::image type="content" source="./media/sorting-data/alphabetical-sort-operation.png" alt-text="Graphic that shows an alphabetical sort operation."::: From 8e3a0b8a5172459de3b53d1077f992c200ed29a3 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Wed, 29 May 2024 11:28:25 -0400 Subject: [PATCH 2/5] Move statement to limitations section Fixes #41095 --- docs/csharp/advanced-topics/expression-trees/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/csharp/advanced-topics/expression-trees/index.md b/docs/csharp/advanced-topics/expression-trees/index.md index a5815b961482a..19735e97efe87 100644 --- a/docs/csharp/advanced-topics/expression-trees/index.md +++ b/docs/csharp/advanced-topics/expression-trees/index.md @@ -24,8 +24,6 @@ You can have the C# or Visual Basic compiler create an expression tree for you b When a lambda expression is assigned to a variable of type , the compiler emits code to build an expression tree that represents the lambda expression. -The C# compiler generates expression trees only from expression lambdas (or single-line lambdas). It can't parse statement lambdas (or multi-line lambdas). For more information about lambda expressions in C#, see [Lambda Expressions](../../language-reference/operators/lambda-expressions.md). - The following code examples demonstrate how to have the C# compiler create an expression tree that represents the lambda expression `num => num < 5`. ```csharp @@ -40,6 +38,8 @@ Once you build an expression tree, you [execute the code represented by the expr ## Limitations +The C# compiler generates expression trees only from expression lambdas (or single-line lambdas). It can't parse statement lambdas (or multi-line lambdas). For more information about lambda expressions in C#, see [Lambda Expressions](../../language-reference/operators/lambda-expressions.md). + There are some newer C# language elements that don't translate well into expression trees. Expression trees can't contain `await` expressions, or `async` lambda expressions. Many of the features added in C# 6 and later don't appear exactly as written in expression trees. Instead, newer features are exposed in expression trees in the equivalent, earlier syntax, where possible. Other constructs aren't available. It means that code that interprets expression trees works the same when new language features are introduced. However, even with these limitations, expression trees do enable you to create dynamic algorithms that rely on interpreting and modifying code that is represented as a data structure. It enables rich libraries such as Entity Framework to accomplish what they do. Expression trees won't support new expression node types. It would be a breaking change for all libraries interpreting expression trees to introduce new node types. The following list includes most C# language elements that can't be used: From adfbd718e78e0c68d4e58b26cf1311170883bde2 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Wed, 29 May 2024 11:33:40 -0400 Subject: [PATCH 3/5] move file to fix build warnings --- .../csharp/advanced-topics/expression-trees/index.md | 12 ++++++------ .../includes/linq-syntax.md | 0 2 files changed, 6 insertions(+), 6 deletions(-) rename docs/csharp/linq/{standard-query-operators => }/includes/linq-syntax.md (100%) diff --git a/docs/csharp/advanced-topics/expression-trees/index.md b/docs/csharp/advanced-topics/expression-trees/index.md index 19735e97efe87..0b829d3da1aff 100644 --- a/docs/csharp/advanced-topics/expression-trees/index.md +++ b/docs/csharp/advanced-topics/expression-trees/index.md @@ -1,18 +1,18 @@ --- title: "Expression Trees" description: Learn about expression trees. See how to compile and run code represented by these data structures, where each node is an expression. -ms.date: 03/07/2023 +ms.date: 05/29/2024 ms.custom: updateeachrelease --- # Expression Trees *Expression trees* represent code in a tree-like data structure, where each node is an expression, for example, a method call or a binary operation such as `x < y`. -If you have used LINQ, you have experience with a rich library where the `Func` types are part of the API set. (If you aren't familiar with LINQ, you probably want to read [the LINQ tutorial](/dotnet/csharp/linq/) and the article about [lambda expressions](../../language-reference/operators/lambda-expressions.md) before this one.) Expression Trees provide richer interaction with the arguments that are functions. +If you used LINQ, you have experience with a rich library where the `Func` types are part of the API set. (If you aren't familiar with LINQ, you probably want to read [the LINQ tutorial](/dotnet/csharp/linq/) and the article about [lambda expressions](../../language-reference/operators/lambda-expressions.md) before this one.) Expression Trees provide richer interaction with the arguments that are functions. You write function arguments, typically using Lambda Expressions, when you create LINQ queries. In a typical LINQ query, those function arguments are transformed into a delegate the compiler creates. -You've likely already written code that uses Expression trees. Entity Framework's LINQ APIs accept Expression trees as the arguments for the LINQ Query Expression Pattern. That enables [Entity Framework](/ef/) to translate the query you wrote in C# into SQL that executes in the database engine. Another example is [Moq](https://github.com/Moq/moq), which is a popular mocking framework for .NET. +You already write code that uses Expression trees. Entity Framework's LINQ APIs accept Expression trees as the arguments for the LINQ Query Expression Pattern. That enables [Entity Framework](/ef/) to translate the query you wrote in C# into SQL that executes in the database engine. Another example is [Moq](https://github.com/Moq/moq), which is a popular mocking framework for .NET. When you want to have a richer interaction, you need to use *Expression Trees*. Expression Trees represent code as a structure that you examine, modify, or execute. These tools give you the power to manipulate code during run time. You write code that examines running algorithms, or injects new capabilities. In more advanced scenarios, you modify running algorithms and even translate C# expressions into another form for execution in another environment. @@ -44,7 +44,7 @@ There are some newer C# language elements that don't translate well into express Expression trees won't support new expression node types. It would be a breaking change for all libraries interpreting expression trees to introduce new node types. The following list includes most C# language elements that can't be used: -- [Conditional methods](../../language-reference/preprocessor-directives.md#conditional-compilation) that have been removed +- [Conditional methods](../../language-reference/preprocessor-directives.md#conditional-compilation) removed from the output - [`base` access](../../language-reference/keywords/base.md) - Method group expressions, including [*address-of* (`&`)](../../language-reference/operators/pointer-related-operators.md) a method group, and anonymous method expressions - References to [local functions](../../programming-guide/classes-and-structs/local-functions.md) @@ -59,10 +59,10 @@ Expression trees won't support new expression node types. It would be a breaking - Lambda expressions that have [attributes](../../language-reference/operators/lambda-expressions.md#attributes) - [Interpolated strings](../../language-reference/tokens/interpolated.md) - UTF-8 string conversions or [UTF-8 string literals](../../language-reference/builtin-types/reference-types.md#utf-8-string-literals) -- Method invocations using [variable arguments](../../language-reference/keywords/method-parameters.md#params-modifier), [named arguments or optional arguments](../../programming-guide/classes-and-structs/named-and-optional-arguments.md) +- Method invocations using [variable arguments](../../language-reference/keywords/method-parameters.md#params-modifier), [named arguments, or optional arguments](../../programming-guide/classes-and-structs/named-and-optional-arguments.md) - Expressions using or , [index "from end" (`^`) operator](../../language-reference/operators/member-access-operators.md#index-from-end-operator-) or [range expressions (`..`)](../../language-reference/operators/member-access-operators.md#range-operator-) - [`async` lambda expressions or `await` expressions](../../language-reference/operators/lambda-expressions.md#async-lambdas), including [`await foreach` and `await using`](../../language-reference/operators/await.md#asynchronous-streams-and-disposables) - [Tuple literals, tuple conversions, tuple `==` or `!=`, or `with` expressions](../../language-reference/builtin-types/value-tuples.md) -- [Discards (`_`)](../../fundamentals/functional/discards.md), [deconstructing assignment](../../fundamentals/functional/deconstruct.md), [pattern matching `is` operator or the pattern matching `switch` expression](../../language-reference/operators/patterns.md) +- [Discards (`_`)](../../fundamentals/functional/discards.md), [deconstructing assignment](../../fundamentals/functional/deconstruct.md), [pattern matching `is` operator, or the pattern matching `switch` expression](../../language-reference/operators/patterns.md) - COM call with `ref` omitted on the arguments - [`ref`](../../language-reference/keywords/ref.md), [`in`](../../language-reference/keywords/method-parameters.md#in-parameter-modifier) or [`out`](../../language-reference/keywords/method-parameters.md#out-parameter-modifier) parameters, `ref` return values, `out` arguments, or any values of [`ref struct` type](../../language-reference/builtin-types/ref-struct.md) diff --git a/docs/csharp/linq/standard-query-operators/includes/linq-syntax.md b/docs/csharp/linq/includes/linq-syntax.md similarity index 100% rename from docs/csharp/linq/standard-query-operators/includes/linq-syntax.md rename to docs/csharp/linq/includes/linq-syntax.md From bacfda377795a57312db6cb52c9a673fc0ca864d Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Wed, 29 May 2024 11:37:49 -0400 Subject: [PATCH 4/5] warnings part 2. --- docs/csharp/linq/includes/linq-syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/linq/includes/linq-syntax.md b/docs/csharp/linq/includes/linq-syntax.md index 3eb4b0b69f6c7..f43688ecaf60e 100644 --- a/docs/csharp/linq/includes/linq-syntax.md +++ b/docs/csharp/linq/includes/linq-syntax.md @@ -7,4 +7,4 @@ ms.date: 05/29/2024 > [!IMPORTANT] > -> These samples use a data source. Data sources based on use data sources and [expression trees](../../../advanced-topics/expression-trees/index.md). Expression trees have [limitations](../../../advanced-topics/expression-trees/index.md#limitations) on the allowed C# syntax. Furthermore, each `IQueryProvider` data source, such as [EF Core](/ef/core/querying/complex-query-operators) may impose more restrictions. Check the documentation for your data source. +> These samples use a data source. Data sources based on use data sources and [expression trees](../../advanced-topics/expression-trees/index.md). Expression trees have [limitations](../../advanced-topics/expression-trees/index.md#limitations) on the allowed C# syntax. Furthermore, each `IQueryProvider` data source, such as [EF Core](/ef/core/querying/complex-query-operators) may impose more restrictions. Check the documentation for your data source. From 7eac0b8123edd4ca326494ff7c81213cd56459c6 Mon Sep 17 00:00:00 2001 From: Bill Wagner Date: Thu, 30 May 2024 08:44:16 -0400 Subject: [PATCH 5/5] Update docs/csharp/linq/includes/linq-syntax.md Co-authored-by: David Pine --- docs/csharp/linq/includes/linq-syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/csharp/linq/includes/linq-syntax.md b/docs/csharp/linq/includes/linq-syntax.md index f43688ecaf60e..fe37433f5e326 100644 --- a/docs/csharp/linq/includes/linq-syntax.md +++ b/docs/csharp/linq/includes/linq-syntax.md @@ -7,4 +7,4 @@ ms.date: 05/29/2024 > [!IMPORTANT] > -> These samples use a data source. Data sources based on use data sources and [expression trees](../../advanced-topics/expression-trees/index.md). Expression trees have [limitations](../../advanced-topics/expression-trees/index.md#limitations) on the allowed C# syntax. Furthermore, each `IQueryProvider` data source, such as [EF Core](/ef/core/querying/complex-query-operators) may impose more restrictions. Check the documentation for your data source. +> These samples use an data source. Data sources based on use data sources and [expression trees](../../advanced-topics/expression-trees/index.md). Expression trees have [limitations](../../advanced-topics/expression-trees/index.md#limitations) on the allowed C# syntax. Furthermore, each `IQueryProvider` data source, such as [EF Core](/ef/core/querying/complex-query-operators) may impose more restrictions. Check the documentation for your data source.