Questions tagged [odatalib]

ODataLib provides building blocks for the parts of the OData protocol that are hard to get right.

ODataLib provides building blocks for the parts of the OData protocol that are hard to get right.
You can combine some or all of these building blocks with your own code to let your application speak OData.

Its main features are:

  • Use components independently or in conjunction with each other.
  • Contains both server and client components.
  • Use only what you need.
  • Your application remains in charge. ODataLib only does stuff when you ask it to.

Home: https://github.com/OData/odata.net

20 questions
5
votes
1 answer

C# odata action with complex type collection fails

I need to call a server that exposes an action. This action has either a string of a collection of complex types or a collection of complex types as parameters. I need to call either. Metadata is: either:
TomTom
  • 61,059
  • 10
  • 88
  • 148
3
votes
1 answer

Parse huge OData JSON by streaming certain sections of the json to avoid LOH

I have an OData response as JSON (Which is in few MBs) and the requirement is to stream "certain parts of JSON" without even loading them to memory. For Example: When I'm reading the property "value[0].Body.Content" in the below JSON (which will be…
Kishore Bandi
  • 5,537
  • 2
  • 31
  • 52
3
votes
1 answer

How can I build a OData client based on a shared model (POCO classes)?

In my project I am using OData v3 and v4 (ASP.NET Web API with Entity Framework in the back). Currently I built a client using the Visual Studio tools. But is there another way? Do I really have to build a client based on the $metadata and the…
rittergig
  • 715
  • 1
  • 5
  • 16
3
votes
2 answers

How can I create complex values in Microsoft.OData.Core when ODataComplexValue is missing in version 7?

I'm parsing metadata from an OData service using Microsoft.OData (ODataLib) version 7. After parsing the ODataModel, I want to create an example message with sample values for all declared properties. So far so good. Works for primitive values in…
Christoph
  • 253
  • 1
  • 3
  • 9
1
vote
2 answers

How to select and expand on properties which are available only in derivedtypes

I have three entities, in an inheritance hierarchy as shown below.
Abhishek Agrawal
  • 2,183
  • 1
  • 17
  • 24
1
vote
1 answer

Where can I find release notes for Microsoft.AspNet.OData

We are upgrading our Microsoft.AspNet.OData from 6.0.0 to latest stable version. I am looking for release notes to know any breaking changes but I couldn't find any page detailing so. Not even on…
Abhishek Agrawal
  • 2,183
  • 1
  • 17
  • 24
1
vote
0 answers

Understanding The Odata Update query

I want to update an OData entity, but first, I get the entity from the data source using a $select query to get the fundamental values and the fields I want to update. Due to the OData source's nature, an update may cause other areas to be updated…
toryb
  • 75
  • 1
  • 10
1
vote
1 answer

OData Shortened Key Predicate Support

I'm building a OData service using the ODataLib v7.1.1 bits from Microsoft.OData.Core (et al). I'm having trouble using the shortened key predicate URL format with ODataUriParser.ParsePath(). The (relative) URL "Company('Comp1')/Customer(1)" throws…
1
vote
1 answer

Does OData lib support @odata.nextLink on expanded feeds?

I am using ODataLib to parse OData V4 feeds and entries. One of the OData feeds returns payload with expanded associations that look like this: { "@odata.context":"https://myfeed.com/api/data/v8.1/$metadata#accounts(name,Account_Tasks)","value":[ …
Vagif Abilov
  • 9,835
  • 8
  • 55
  • 100
1
vote
1 answer

OData attribute routing for deleting relationship between m:m entities

The scenario is an application that uses OData v4, server-side API based on an Entity Framework model using ODataLib, client-side using the OData client code generator extension for Visual Studio I'm failing to get OData attribute routing working…
1
vote
1 answer

Does ODataLib for OData V4 support Atom payload in requests?

I am trying to use ODataLib for OData protocol V4 (Microsoft.OData.Core) to generate payload in Atom format. I ensured that Content-Type and Accept headers refer application/atom+xml, however a call to CreateODataEntryWriter always result in…
Vagif Abilov
  • 9,835
  • 8
  • 55
  • 100
1
vote
2 answers

Serialize value to OData

Is there a function (perhaps in ODataLib 5.6.1) to serialize a .NET primitive type to OData URI format (see) for instance: new DateTime(2000,12,12).ToODataString() //would return: datetime’2000-12-12T12:00′
Nestor
  • 13,706
  • 11
  • 78
  • 119
0
votes
1 answer

OData metadata url request fails if I set the version

The following code gets a 500: WebRequest request = WebRequest.Create("https://services.odata.org/TripPinRESTierService/$metadata"); HttpWebRequest webRequest = request as HttpWebRequest; webRequest.Accept =…
David Thielen
  • 28,723
  • 34
  • 119
  • 193
0
votes
1 answer

How to update a related CRM entity reference with ODataLib?

I'm using the ODataLib (http://odata.github.io) and the Client Generated Library to access Microsoft CRM's OData API (v9.0). I'm trying to update the entity navigation property value (the GUID), but the update doesn't seem to do anything (no calls…
kor_
  • 1,510
  • 1
  • 16
  • 36
0
votes
0 answers

How to add a ODataUriResolver to the default ODataUriParser

I created an OData v4 EndPoint using OData-WebApi and ODataLib. I want to add a new ODataUriResolver to the default ODataUriParser which the ODataWebApi is using. I know how to add a custom ODataUriResolver to a new instacne of ODataUriParser but…
Yogev
  • 141
  • 4
  • 14
1
2