Difference between Microsoft.OData.Core and Microsoft.Data.OData

I am working on Web Api with OData enabled. I started working by contacting (only relevant DLLs are mentioned to the question)

Microsoft.AspNet.WebApi.OData Microsoft.Data.OData Microsoft.Data.Edm System.Spatial 

But when I found out that OData is case-sensitive by default , I look for a case-insensitive solution, and I went through a few messages OData Uri case - insensitive support and ODataLib 6.7.0 Release then finally landed in Microsoft.OData.Core 6.9 nuget package .0 which seems to solve my problem. This is where the confusion begins , it has its own libraries related to assemblies in different namespaces

 Microsoft.OData.Core-----------VS------Microsoft.Data.OData Microsoft.OData.Edm------------VS------Microsoft.Data.Edm Microsoft.Spatial--------------VS------System.Spatial 

What is the difference between the above similar libraries, where should we use one on the other? In my cases like this, can Microsoft.OData.Core be used instead of Microsoft.Data.OData, which solves the case-sensitive problem?

+6
source share
1 answer

1. About the name,


 Microsoft.Data.OData Microsoft.Data.Edm System.Spatial 

is an implementation of OData Version 3.0 Spec . The package name in Nuget ends with OData v1-3 . For example: ODataLib for OData v1-3

While,

 Microsoft.OData.Core Microsoft.OData.Edm Microsoft.Spatial 

is an implementation of OData Version 4.0 Spec . The package name in Nuget does not contain a version. For example: ODataLib

2. About case insensitivity


OData's Web API will support case-insensitive, unqualified function / action calls and the Enum prefix in version 5.4.

Here is a simple example that you can refer to.

Source codes move to: OData WebAPI on Github

And you can get the binary from the nightly build.

+10
source

Source: https://habr.com/ru/post/981199/


All Articles