@@ -162,7 +162,7 @@ and the corresponding warning message displayed by the {+product+}:
162
162
163
163
.. code-block:: csharp
164
164
165
- _ = moviesCollection .Where(m => m .GetHashCode() == 1234 );
165
+ var result = queryableColl .Where(b => b .GetHashCode() == 167 );
166
166
167
167
The following screenshot shows the annotation displayed by the {+product+}
168
168
underneath the preceding code snippet in Visual Studio:
@@ -178,7 +178,7 @@ and the corresponding warning message displayed by the {+product+}:
178
178
.. code-block:: text
179
179
:copyable: false
180
180
181
- NotSupportedLinqExpression C# {document} .GetHashCode() is not supported .
181
+ Expression not supported: b .GetHashCode().
182
182
183
183
The following screenshot shows the warning displayed in Visual Studio:
184
184
@@ -188,7 +188,7 @@ and the corresponding warning message displayed by the {+product+}:
188
188
.. include:: /includes/error-list-window.rst
189
189
190
190
To view more examples of unsupported LINQ expressions, see the
191
- `{+product+} Github repository <{+product-source-repo+}/tests/MongoDB.Analyzer.Tests.Common.TestCases/Linq/NotSupportedLinqExpressions.cs>`__.
191
+ `{+product+} Github repository <{+product-source-repo+}/blob/main/ tests/MongoDB.Analyzer.Tests.Common.TestCases/Linq/NotSupportedLinqExpressions.cs>`__.
192
192
193
193
.. _mongodb-analyzer-analyze-linq3:
194
194
@@ -215,19 +215,19 @@ provider. To learn how to configure your LINQ provider, see the
215
215
216
216
.. code-block:: csharp
217
217
218
- _ = moviesCollection .Where(m => m.Producer .Substring(0, 6 ) == "Steven")
218
+ var result = queryableColl .Where(b => b.Title .Substring(0) == "Pane");
219
219
220
220
.. tab:: Warning
221
221
:tabid: warning-linq3
222
222
223
223
.. code-block:: text
224
224
:copyable: false
225
225
226
- NotSupportedLinq2Expression Supported in LINQ3 only: db.coll.Aggregate([{ "$match" : { "$expr" : { "$eq" : [{ "$substrCP" : ["$Producer ", 0, 6 ] }, "Steven "] } } }])
226
+ Supported in LINQ3 only: db.coll.Aggregate([{ "$match" : { "$expr" : { "$eq" : [{ "$substrCP" : ["$Title ", 0, { "$subtract" : [{ "$strLenCP" : "$Title" }, 0 ] }] } , "Pane "] } } }])
227
227
228
228
To learn more about LINQ3, see `LINQ3 <{+driver-docs+}reference/driver/crud/linq3/>`__
229
229
in the {+driver-short+} documentation.
230
230
231
231
To view examples of expressions the {+driver-short+} only supports with the LINQ3 provider, see the
232
232
`{+product+} Github repository
233
- <{+product-source-repo+}/tests/MongoDB.Analyzer.Tests.Common.TestCases/Linq/NotSupportedLinq2.cs>`__.
233
+ <{+product-source-repo+}/blob/main/ tests/MongoDB.Analyzer.Tests.Common.TestCases/Linq/NotSupportedLinq2.cs>`__.
0 commit comments