Skip to content

DOCSP-42484 - Remove LINQ2 #229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions source/faq.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,7 @@ If you receive an ``Unsupported filter ...`` or ``Expression not
supported ...`` exception message, try the following
steps:

1. Try configuring the new `LINQ3
<https://mongodb.github.io/mongo-csharp-driver/2.17/reference/driver/crud/linq3/>`__
provider. The LINQ3 provider contains many fixes and new features
over the LINQ2 provider.
#. Use the `{+analyzer+}
1. Use the `{+analyzer+}
<https://www.mongodb.com/docs/mongodb-analyzer/current/>`__ to analyze your
expressions.
#. Try to simplify your query where possible.
Expand Down
6 changes: 6 additions & 0 deletions source/fundamentals/linq.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ strongly typed collections of objects by using language keywords and operators.
The {+driver-short+} automatically translates LINQ queries into
:manual:`aggregation operations </aggregation>`.

.. important::

LINQ3 is the only LINQ provider available in the {+driver-long+}. If you have
manually configured your project to use LINQ2, you must change your provider to
LINQ3 to use this version of the driver.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rstam IIRC LINQ provider configuration option was removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had meant this to refer to whatever custom configuration some users might have done to stick with LINQ2 after LINQ3 became the default. Is there a better way to phrase this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MongoClientSettings LinqProvider property has been removed.

If the client has code to configure the client settings to use LINQ2 it will no longer compile.

They need to remove that code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying!

The examples in this guide use the ``restaurants`` collection
in the ``sample_restaurants`` database provided in the :atlas:`Atlas sample datasets </sample-data>`.
To learn how to create a free MongoDB Atlas cluster and load the sample datasets,
Expand Down
3 changes: 3 additions & 0 deletions source/upgrade.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ Version 3.0 Potential Breaking Change
configuring authentication in the {+driver-short+}, see
:ref:`Authentication Mechanisms. <csharp-authentication-mechanisms>`

- The LINQ2 provider has been removed from this version of the driver.
You must use LINQ3 for all LINQ queries.

.. _csharp-breaking-changes-2.28.0:

Version 2.28.0 Potential Breaking Change
Expand Down
Loading