-
Notifications
You must be signed in to change notification settings - Fork 114
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
Conversation
Learn Build status updates of commit 4b8dee2: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Learn Build status updates of commit fb24161: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Co-authored-by: Samuel Wanjohi <[email protected]>
Co-authored-by: Samuel Wanjohi <[email protected]>
Learn Build status updates of commit 792537f: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Learn Build status updates of commit fc0ae2f: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Learn Build status updates of commit 5e0b911: ✅ Validation status: passed
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 */)`: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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`. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
The issue with dropping support for |
Co-authored-by: Elizabeth Okerio <[email protected]>
Learn Build status updates of commit e634b96: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Learn Build status updates of commit 9930a57: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Learn Build status updates of commit 923698f: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
Learn Build status updates of commit c545423: ✅ Validation status: passed
For more details, please refer to the build report. For any questions, please:
|
* 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]>
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.