OData lib 8.x changelog
OData lib is loosely used to refer to the following group of OData libraries available on the Nuget gallery:
You can install or update any of the NuGet packages for OData lib using the Package Manager Console.
8.0.0-preview.1
Starting version 8, OData lib will only target .NET 8 or later.
Microsoft.OData.Core
IJsonReaderAsyncinterface has been merged intoIJsonReaderinterface.- Any implementation of
IJsonReaderneeds to implement methods previously defined inIJsonReaderAsyncinterfaces. - The
Valueproperty inIJsonReaderinterface is replaced byGetValuemethod.
- Any implementation of
IJsonReaderFactoryAsyncinterface has been dropped.IJsonStreamWriter,IJsonWriterAsyncandIJsonStreamWriterAsyncinterfaces have been merged intoIJsonWriterinterface.- Any implementation of
IJsonWriterneeds to implement methods previously defined inIJsonStreamWriter,IJsonWriterAsyncandIJsonStreamWriterAsyncinterfaces.
- Any implementation of
IStreamBasedJsonWriterFactoryandIJsonWriterFactoryAsyncinterfaces has been dropped.DefaultStreamBasedJsonWriterFactoryclass has been renamed toODataUtf8JsonWriterFactory.CreateJsonWriter(TextReader, bool)defined inIJsonWriterFactoryhas changed toCreateJsonWriter(Stream, bool, Encoding). The method now accepts aStreamrather than aTextReader.List<ODataUrlValidationMessage> Messagesproperty defined inODataUrlValidationContextclass has changed toIReadOnlyList<ODataUrlValidationMessage> Messages.AddMessage(ODataUrlValidationMessage)overload introduced inODataUrlValidationContext.
INavigationSourceSegmentinterface introduced. The purpose of this new interface is to reduce casting when determining the navigation source associated with the segment.EntitySetSegment,SingletonSegmentandNavigationPropertySegmentimplement this new interface.- Deprecated support for JSONP callback. Feature to be removed in ODL 9.
JsonPCallbackproperty defined inODataMessageWriterSettingsclass marked as obsolete.StartPaddingFunctionScopemethod defined inIJsonWriterinterface marked as obsolete.EndPaddingFunctionScopemethod defined inIJsonWriterinterface marked as obsolete.WritePaddingFunctionNamemethod defined inIJsonWriterinterface marked as obsolete.StartPaddingFunctionScopeAsyncmethod defined inIJsonWriterinterface marked as obsolete.EndPaddingFunctionScopeAsyncmethod defined inIJsonWriterinterface marked as obsolete.WritePaddingFunctionNameAsyncmethod defined inIJsonWriterinterface marked as obsolete.
ODataSimplifiedOptionsclass was dropped. This class would be injected into the DI container and the settings used to control behaviour when parsing URLs, and when writing and reading payloads. In ODL 8,ODataMessageReaderSettings,ODataMessageWriterSettings, andODataUriParserSettingsmay variously be used to accomplish the same purpose.EnableReadingKeyAsSegmentandEnableReadingODataAnnotationWithoutPrefixproperties moved toODataMessageReaderSettingsclass.EnableWritingKeyAsSegmentproperty moved toODataMessageWriterSettingsclass.SetOmitODataPrefix(bool),SetOmitODataPrefix(bool, ODataVersion),GetOmitODataPrefix(), andGetOmitODataPrefix(ODataVersion)methods moved toODataMessageWriterSettingsclass.EnableParsingKeyAsSegmentproperty moved toODataUriParserSettingsclass.
- In ODL 7, when
ODataBinaryStreamValueclass is initialized using theODataBinaryStreamValue(Stream)constructor, the stream is left open by default upon the object being disposed. In ODL 8, the stream is closed by default the object objects is disposed. TheODataBinaryStreamValue(Stream, bool)constructor overload may be used where leaving the stream open is intended. Func<string, bool> ShouldIncludeAnnotationproperty introduced inODataMessageWriterSettings. This property makes it possible for developers to force a custom instance annotation to be written even if it's not include in the optional@odata.include-annotationspreference token inPreferrequest header.IContainerBuilderinterface used when registering OData services was dropped. UseMicrosoft.Extensions.DependencyInjectionlibrary instead.AddDefaultODataServices(IServiceCollection, ODataVersion, Action<ODataMessageReaderSettings>, Action<ODataMessageWriterSettings>, Action<ODataUriParserSettings>)extension method introduced for the purpose of registering OData services.IContainerProviderinterface replaced byIServiceCollectionProviderinterface. It's a provider for theIServiceProviderIoC container.ODataBatchOperationRequestMessagenow implementsIServiceCollectionProviderinstead ofIContainerProvider.ODataBatchOperationResponseMessagenow implementsIServiceCollectionProviderinstead ofIContainerProvider.
Microsoft.OData.Client
HttpWebRequestMessageclass has been dropped - effectively dropping support forHttpWebRequest. UseHttpClientRequestMessageclass instead.IHttpClientHandlerProviderinterface used to provideHttpClientHandlerfor use withDataServiceContexthas been dropped.HttpClientHandlerProviderproperty defined inDataServiceClientRequestMessageArgsclass and used for providingHttpClientHandlersubstituted withHttpClientFactoryproperty that accomplishes the same purpose.HttpClientHandlerProviderproperty defined inDataServiceContextclass and used for providingHttpClientHandlersubstituted withHttpClientFactoryproperty that accomplishes the same purpose.- Obsolete
Credentialsproperty dropped fromDataServiceClientRequestMessageabstract class. The recommended way to configure credentials is throughHttpClientHandlerthat can be provided usingIHttpClientFactory. - Obsolete
Credentialsproperty dropped fromHttpClientRequestMessageclass. The recommended way to configure credentials is throughHttpClientHandlerthat can be provided usingIHttpClientFactory. - Obsolete
Credentialsproperty dropped fromDataServiceContextclass. The recommended way to configure credentials is throughHttpClientHandlerthat can be provided usingIHttpClientFactory. - Obsolete
ReadWriteTimeoutproperty dropped fromDataServiceClientRequestMessageabstract class. This property would be used withHttpWebRequestMessage.Timeoutproperty may be used instead. - Obsolete
ReadWriteTimeoutproperty dropped fromHttpClientRequestMessageclass. This property would be used withHttpWebRequestMessage.Timeoutproperty may be used instead. - In
DataServiceClientRequestMessageArgsclass, theDataServiceClientRequestMessageArgs(string, Uri, bool, bool, IDictionary<string, string>)constructor has changed toDataServiceClientRequestMessageArgs(string, Uri, bool, IDictionary<string, string>). The booleanuseDefaultCredentialsparameter is no longer supported. - In
DataServiceClientRequestMessageArgsclass, theDataServiceClientRequestMessageArgs(string, Uri, bool, bool, IDictionary<string, string>, IHttpClientHandlerProvider)constructor has changed toDataServiceClientRequestMessageArgs(string, Uri, bool, IDictionary<string, string>, IHttpClientFactory). The booleanuseDefaultCredentialsparameter is no longer supported. - In
DataServiceClientRequestMessageArgsclass, theUseDefaultCredentialsproperty dropped fromDataServiceClientRequestMessageArgsclass. The recommended way to configure credentials is throughHttpClientHandlerthat can be provided usingIHttpClientFactory. HttpRequestTransportModeenum property was dropped fromDataServiceContext. This property was used to switch betweenHttpClientandHttpWebRequestthat was dropped.KeyComparisonGeneratesFilterQueryflag defined inDataServiceContextclass marked as deprecated. Flag will be removed in ODL 9.- Default value for
keyComparisonGeneratesFilterQueryflag set to true such that aWhereexpression with only the key property in the predicate is translated into a$filterquery rather a resouce URL for requesting a single entity.
- Default value for
- Obsolete
IncludeTotalCount()method was dropped fromDataServiceQuery<TElement>class. UseIncludeCount()method. - Obsolete
IncludeTotalCount(bool)method was dropped fromDataServiceQuery<TElement>class: UseIncludeCount(bool)the method. - Obsolete
TotalCountproperty was dropped fromQueryOperationResponseclass. UseCountproperty. - Obsolete
TotalCountproperty was dropped fromQueryOperationResponse<T>class. UseCountproperty. - Obsolete
CreateODataDeltaReader(IEdmEntitySetBase, IEdmEntityType)method dropped fromODataMessageReaderclass. UseCreateODataDeltaResourceSetReader(IEdmEntitySetBase, IEdmStructuredType)method. - Obsolete
CreateODataDeltaReaderAsync(IEdmEntitySetBase, IEdmEntityType)method dropped fromODataMessageReaderclass. UseCreateODataDeltaResourceSetReader(IEdmEntitySetBase, IEdmStructuredType)method. - Obsolete
CreateODataDeltaWriter(IEdmEntitySetBase, IEdmEntityType)method dropped fromODataMessageReaderclass. UseCreateODataDeltaResourceSetWriter(IEdmEntitySetBase, IEdmStructuredType)method. - Obsolete
CreateODataDeltaWriterAsync(IEdmEntitySetBase, IEdmEntityType)method dropped fromODataMessageReaderclass. UseCreateODataDeltaResourceSetWriterAsync(IEdmEntitySetBase, IEdmStructuredType)method. - Obsolete
Expressionsproperty dropped fromAggregateTokenclass. UseAggregateExpressionsproperty. - Obsolete
Expressionsproperty dropped fromAggregateTransformationNodeclass. UseAggregateExpressionsproperty. - Obsolete
EntityTypeInvalidKeyKeyDefinedInBaseClassvalidation rule dropped fromValidationRulesclass. UseEntityTypeInvalidKeyKeyDefinedInAncestorvalidation rule. - Obsolete
EntityTypeKeyMissingOnEntityTypevalidation rule dropped fromValidationRulesclass. UseNavigationSourceTypeHasNoKeysvalidation rule.
Microsoft.OData.Edm
IEdmEntityType EntityTypeproperty introduced inIEdmNavigationSourceinterface.- Any implementation of
IEdmNavigationSourceneeds to implement theEntityTypeproperty. - The public
EntityType(IEdmNavigationSource)static method has been marked as obsolete and will be removed in ODL 9.
- Any implementation of
Feedback
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.
Submit and view feedback for

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
