Skip to content
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

Migration guide for OData .NET 8 #319

Merged
merged 19 commits into from
Aug 12, 2024
Merged

Conversation

habbes
Copy link
Contributor

@habbes habbes commented Aug 9, 2024

Adds a What's new section in the docs, and an What's new in OData .NET 8 page, inspired by ASP.NET Core, C# and EF Core docs. I was debating whether to have 2 articles: What's new in OData .NET 8 and Breaking changes in OData .NET 8. But I decided to keep it simple with just one article that combines both breaking changes and new features. Let me know what you think.

I didn't realize initially that this PR also includes the support policy, which was being tracked in a separate PR #315. But it since it hasn't yet been merged, they could get merged together.

Copy link
Contributor

Learn Build status updates of commit 4b8dee2:

✅ Validation status: passed

File Status Preview URL Details
Odata-docs/changelog/odatalib-8x.md ✅Succeeded View
Odata-docs/includes/applies-to-odataclient-v8.md ✅Succeeded View
Odata-docs/includes/appliesto-odatalib-v8.md ✅Succeeded View
Odata-docs/odatalib/whats-new/odatalib-8.md ✅Succeeded
Odata-docs/support/support-policy.md ✅Succeeded View
Odata-docs/TOC.yml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit fb24161:

✅ Validation status: passed

File Status Preview URL Details
Odata-docs/changelog/odatalib-8x.md ✅Succeeded View
Odata-docs/includes/applies-to-odataclient-v8.md ✅Succeeded View
Odata-docs/includes/appliesto-odatalib-v8.md ✅Succeeded View
Odata-docs/odatalib/whats-new/odatalib-8.md ✅Succeeded
Odata-docs/support/support-policy.md ✅Succeeded View
Odata-docs/TOC.yml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit 792537f:

✅ Validation status: passed

File Status Preview URL Details
Odata-docs/changelog/odatalib-8x.md ✅Succeeded View
Odata-docs/includes/applies-to-odataclient-v8.md ✅Succeeded View
Odata-docs/includes/appliesto-odatalib-v8.md ✅Succeeded View
Odata-docs/odatalib/whats-new/odatalib-8.md ✅Succeeded
Odata-docs/support/support-policy.md ✅Succeeded View
Odata-docs/TOC.yml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit fc0ae2f:

✅ Validation status: passed

File Status Preview URL Details
Odata-docs/changelog/odatalib-8x.md ✅Succeeded View
Odata-docs/includes/applies-to-odataclient-v8.md ✅Succeeded View
Odata-docs/includes/appliesto-odatalib-v8.md ✅Succeeded View
Odata-docs/odatalib/whats-new/odatalib-8.md ✅Succeeded
Odata-docs/support/support-policy.md ✅Succeeded View
Odata-docs/TOC.yml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit 5e0b911:

✅ Validation status: passed

File Status Preview URL Details
Odata-docs/changelog/odatalib-8x.md ✅Succeeded View
Odata-docs/includes/applies-to-odataclient-v8.md ✅Succeeded View
Odata-docs/includes/appliesto-odatalib-v8.md ✅Succeeded View
Odata-docs/odatalib/whats-new/odatalib-8.md ✅Succeeded
Odata-docs/support/support-policy.md ✅Succeeded View
Odata-docs/TOC.yml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

};
```

Here's how it would be written in OData .NET 7 with `ODataJsonWriterUtils.WriteError(odataError, /* other parameters */)`:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this meant to be .NET 8

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By I OData .NET 7, I meant ODL 7. This is how we used to do it before, and below I show how do it in the new version.

Console.WriteLine(friend.FirstName);
```

Alternatively, we could set `DataServiceContext.KeyComparisonGeneratesFilterQuery` to false, but it's no longer recommended:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can get rid of this statement since we do not recommend this so that people get used to the other options.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The reason I mentioned it here is for people for whom this change will break things, and migration might require changing a lot of code (if the old pattern was used in many places). This could provide a quick temporary workaround.


### Other obsolete APIs that have been removed

- Obsolete `Credentials` property dropped from `DataServiceClientRequestMessage` abstract class. The recommended way to configure credentials is through `HttpClientHandler` that can be provided using `IHttpClientFactory`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary to provide a small snippet of how to configure this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added code samples in the section that talks about IHttpClientFactory support.

@ElizabethOkerio
Copy link
Contributor

The issue with dropping support for OData.Net 7.x was it resolved really? There were some concerns that if we drop it then OData will not be supporting .NET framework which .NET supports and which might not sit well with some OData users?

Co-authored-by: Elizabeth Okerio <[email protected]>
Copy link
Contributor

Learn Build status updates of commit e634b96:

✅ Validation status: passed

File Status Preview URL Details
Odata-docs/changelog/odatalib-8x.md ✅Succeeded View
Odata-docs/includes/applies-to-odataclient-v8.md ✅Succeeded View
Odata-docs/includes/appliesto-odatalib-v8.md ✅Succeeded View
Odata-docs/odatalib/whats-new/odatalib-8.md ✅Succeeded
Odata-docs/support/support-policy.md ✅Succeeded View
Odata-docs/TOC.yml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit 9930a57:

✅ Validation status: passed

File Status Preview URL Details
Odata-docs/changelog/odatalib-8x.md ✅Succeeded View
Odata-docs/includes/applies-to-odataclient-v8.md ✅Succeeded View
Odata-docs/includes/appliesto-odatalib-v8.md ✅Succeeded View
Odata-docs/odatalib/whats-new/odatalib-8.md ✅Succeeded
Odata-docs/support/support-policy.md ✅Succeeded View
Odata-docs/TOC.yml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit 923698f:

✅ Validation status: passed

File Status Preview URL Details
Odata-docs/changelog/odatalib-8x.md ✅Succeeded View
Odata-docs/includes/applies-to-odataclient-v8.md ✅Succeeded View
Odata-docs/includes/appliesto-odatalib-v8.md ✅Succeeded View
Odata-docs/odatalib/whats-new/odatalib-8.md ✅Succeeded
Odata-docs/support/support-policy.md ✅Succeeded View
Odata-docs/TOC.yml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

Copy link
Contributor

Learn Build status updates of commit c545423:

✅ Validation status: passed

File Status Preview URL Details
Odata-docs/changelog/odatalib-8x.md ✅Succeeded View
Odata-docs/includes/applies-to-odataclient-v8.md ✅Succeeded View
Odata-docs/includes/appliesto-odatalib-v8.md ✅Succeeded View
Odata-docs/odatalib/whats-new/odatalib-8.md ✅Succeeded
Odata-docs/support/support-policy.md ✅Succeeded View
Odata-docs/TOC.yml ✅Succeeded View

For more details, please refer to the build report.

For any questions, please:

@xuzhg xuzhg merged commit 27fcc68 into MicrosoftDocs:main Aug 12, 2024
2 checks passed
xuzhg added a commit that referenced this pull request Aug 12, 2024
* Support policy for OData libraries

* Update ODL 5 support policy

* Update WebAPI policy

* Update policy

* Update changelog

* Migration docs for Microsoft.OData.Core

* Docs for OData Client and EDM

* Docs for OData Client and EDM

* Update table of contents

* Add link to support policy

* Update Odata-docs/odatalib/whats-new/odatalib-8.md



* Update Odata-docs/odatalib/whats-new/odatalib-8.md



* Update dates on support policy

* Add connected service and OData CLI

* Apply suggestions from code review



* Update ASP.NET Core supported versions

* Custom credentials example

* Code samples for custom service provider

* Minor fixes

---------

Co-authored-by: Clément Habinshuti <[email protected]>
Co-authored-by: Samuel Wanjohi <[email protected]>
Co-authored-by: Elizabeth Okerio <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants