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
Show file tree
Hide file tree
Changes from 14 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: 6 additions & 0 deletions Odata-docs/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@
href: /odata/webapi/odata-security
- name: ODataLib
items:
- name: What's new
items:
- name: What's new in OData .NET 8
href: /odata/odatalib/whats-new/odatalib-8
- name: Core lib
items:
- name: Write OData payload
Expand Down Expand Up @@ -502,6 +506,8 @@
items:
- name: OData Migration extension usage and architecture
href: /odata/extensions/migration
- name: Support policy
href: /odata/support/support-policy
- name: Resources
items:
- name: Tools
Expand Down
21 changes: 21 additions & 0 deletions Odata-docs/changelog/odatalib-8x.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,40 @@ ms.topic: article
# OData lib 8.x changelog

OData lib is loosely used to refer to the following group of OData libraries available on the [Nuget gallery](https://www.nuget.org/packages):

- [Microsoft.OData.Core](https://www.nuget.org/packages/Microsoft.OData.Core)
- [Microsoft.OData.Edm](https://www.nuget.org/packages/Microsoft.OData.Edm)
- [Microsoft.Spatial](https://www.nuget.org/packages/Microsoft.Spatial)
- [Microsoft.OData.Client](https://www.nuget.org/packages/Microsoft.OData.Client)

You can install or update any of the NuGet packages for OData lib using the [Package Manager Console](https://docs.nuget.org/docs/start-here/using-the-package-manager-console).

## [8.0.0-rc.1](https://github.com/OData/odata.net/releases/tag/8.0.0-rc.1)

### [Microsoft.OData.Core](https://www.nuget.org/packages/Microsoft.OData.Core/8.0.0-rc.1)

- Made `ODataUtf8JsonWriter` the default JSON writer implementation to enhance serialization performance. Benchmarks and feedback from some OData users have shown that `ODataUtf8JsonWriter` offers better performance and memory efficiency compared to the current default JsonWriter.
- Changed the `ODataLibraryCompatibility` enum into a flags enum, where each bit represents a different compatibility setting that can enable some legacy serialization behavior.
- Refactored `ODataError`, `ODataErrorDetail` and `ODataInnerError` classes.
- The `ODataErrorDetail`’s `ErrorCode` property updated to Code
- The initialization of `ODataInnerError` changed to `ODataInnerError(new Dictionary<string, ODataValue>())`
- The `ODataResource.Properties` property type was changed to `IEnumerable<ODataPropertyInfo>` to facilitate metadata reading or writing, even in scenarios where the property lacks a value.
- When writing the `Scale` attribute in XML CSDL, use `variable` in lowercase instead of `Variable`. An enum flag, `UseLegacyVariableCasing`, was added to support the legacy behavior.

### [Microsoft.OData.Edm](https://www.nuget.org/packages/Microsoft.OData.Edm/8.0.0-rc.1)

- Added `UsesDefault` property to `IEdmVocabularyAnnotation` to support creating vocabulary annotations without explicit values but with default values. These default values are not written to the CSDL but can be read.

### [Microsoft.OData.Client](https://www.nuget.org/packages/Microsoft.OData.Client/8.0.0-rc.1)

- Renamed `IBaseEntityType.Context` to `DataServiceContext` to avoid naming conflicts that cause compilation or runtime errors when `Context` is used as a property name in customer schemas.

## [8.0.0-preview.1](https://github.com/OData/odata.net/releases/tag/8.0.0-preview.1)

Starting version 8, OData lib will only target .NET 8 or later.

### [Microsoft.OData.Core](https://www.nuget.org/packages/Microsoft.OData.Core/8.0.0-preview.1)

- `IJsonReaderAsync` interface has been merged into `IJsonReader` interface.
- Any implementation of `IJsonReader` needs to implement methods previously defined in `IJsonReaderAsync` interfaces.
- The `Value` property in `IJsonReader` interface is replaced by `GetValue` method.
Expand Down
17 changes: 17 additions & 0 deletions Odata-docs/includes/applies-to-odataclient-v8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title : "OData client v8 supported"
description: OData client v8 supported
ms.date: 08/06/2024
author: habbes
---

# OData client v8 supported

![OData Client V8](/odata/assets/doc-assets/yes.png) OData Client V8


## `Microsoft.OData.Core`

### Default JSON writer changed

The
9 changes: 9 additions & 0 deletions Odata-docs/includes/appliesto-odatalib-v8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title : "OData core lib v8 supported"
description: OData core lib v8 supported.
ms.date: 8/6/2024
author: habbes
---
# OData core lib v8 supported

![OData core lib v8 supported](/odata/assets/doc-assets/yes.png) OData Core Lib V8
Loading