Enable Simplified options
Applies To: # OData core lib v7 supported OData Core Lib V7
In previous OData library, the control of writing/reading/parsing key-as-segment uri path is separated in ODataMessageWriterSettings/ODataMessageReaderSettings/ODataUriParser. The same as writing/reading OData annotation without prefix. From ODataV7.0, we add a centralized control class for them, which is ODataSimplifiedOptions.
The following API can be used in ODataSimplifiedOptions:
public class ODataSimplifiedOptions
{
...
public bool EnableParsingKeyAsSegmentUrl { get; set; }
public bool EnableReadingKeyAsSegment { get; set; }
public bool EnableReadingODataAnnotationWithoutPrefix { get; set; }
public bool EnableWritingKeyAsSegment { get; set; }
public bool EnableWritingODataAnnotationWithoutPrefix { get; set; }
...
}
ODataSimplifiedOptions is registered by DI with singleton ServiceLifetime (Please refer to [Dependency Injection support](../core libraries/2016-08-30-01-05-di-support)).
Feedback
https://aka.ms/ContentUserFeedback.
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:Submit and view feedback for