odata

$expand not working in my JPA/Olingo 2.0.11 OData Service

核能气质少年 提交于 2021-02-08 06:59:27
问题 Would be really interesting if the expand system query option works for any of you when using this library version. Library and Frameworks combination: Java OData 2 JPA Library 2.0.11 + JPA Hibernate + MySQL I am trying to use the system query option "expand" (eg. /books?$expand=PublisherDetails) in an OData query. At UriParserImpl#handleSystemQueryOptionExpand - L#796 occurs a NPE cause the edmType of the fetched property at L#792 is null If i want to query data from another table using

OData and .NET Core 2 Web API - disable case-sensitivity?

℡╲_俬逩灬. 提交于 2021-02-08 02:56:16
问题 I'm new to OData, and I'm trying to integrate it into our .NET Core 2.0 Web API using the Microsoft.AspNetCore.OData 7.0.0-beta1 NuGet package. I would like my OData URLs to be case-insensitive (i.e., http://localhost:1234/odata/products would be the same as http://localhost:1234/odata/Products). How can I accomplish this? The relevant portion of my Startup code is as follows: public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory,

Odata Webapi - how to inject a ODataResourceDeserializer in 7.0 core?

Deadly 提交于 2021-02-07 08:22:35
问题 documentation is very sparce and all i tried results in the deserializer injected but normal odata url's not working anymore. https://github.com/OData/WebApi/issues/158 has solutions buut for 5.6. The final relevant comment is: @dbenzhuser - In that commit, look at ODataFormatterTests.cs for how inject a custom deserializer/deserializer provider. You can still use a custom DeserializerProvider but it's injected through DI instead of injecting it through ODataMediaTypeFormatters. which is

Odata Webapi - how to inject a ODataResourceDeserializer in 7.0 core?

情到浓时终转凉″ 提交于 2021-02-07 08:22:28
问题 documentation is very sparce and all i tried results in the deserializer injected but normal odata url's not working anymore. https://github.com/OData/WebApi/issues/158 has solutions buut for 5.6. The final relevant comment is: @dbenzhuser - In that commit, look at ODataFormatterTests.cs for how inject a custom deserializer/deserializer provider. You can still use a custom DeserializerProvider but it's injected through DI instead of injecting it through ODataMediaTypeFormatters. which is

Wrapping a Web API response in JSON but still having it work with IQueryable and oData

╄→尐↘猪︶ㄣ 提交于 2021-02-07 04:19:47
问题 I have an ASP.NET Web API project, and I want to use oData filters in the project, with the ASP.NET oData preview package. This means I need to use IQueryable as the response type. Unfortunately, the consumer requires the response wrapped like so: { "total": 2, "success": true, "data": [ { object1 }, { object2 } ] } I created a wrapper object which assigns the IQueryable response from my original version to the "data" property, and sets the values for the "total" and "success" properties as

Wrapping a Web API response in JSON but still having it work with IQueryable and oData

风流意气都作罢 提交于 2021-02-07 04:19:21
问题 I have an ASP.NET Web API project, and I want to use oData filters in the project, with the ASP.NET oData preview package. This means I need to use IQueryable as the response type. Unfortunately, the consumer requires the response wrapped like so: { "total": 2, "success": true, "data": [ { object1 }, { object2 } ] } I created a wrapper object which assigns the IQueryable response from my original version to the "data" property, and sets the values for the "total" and "success" properties as

What is the difference between Microsoft.AspNet.WebApi.OData and Microsoft.Data.OData and Microsoft.AspNet.OData?

偶尔善良 提交于 2021-02-06 15:15:40
问题 I am creating a RESTful service using Web API and Entity Framework with OData endpoints. The Microsoft.AspNet.WebApi.OData and Microsoft.Data.OData and Microsoft.AspNet.OData packages seem to overlap, so I wasn't sure which one to use. What are the differences between them? What are the pros and cons of each? 回答1: Microsoft.AspNet.OData is the one you'll most likely want to use for a new project. It sets up Web API to use the OData 4 protocol. Microsoft.AspNet.WebApi.OData is the older

What is the difference between Microsoft.AspNet.WebApi.OData and Microsoft.Data.OData and Microsoft.AspNet.OData?

与世无争的帅哥 提交于 2021-02-06 15:14:24
问题 I am creating a RESTful service using Web API and Entity Framework with OData endpoints. The Microsoft.AspNet.WebApi.OData and Microsoft.Data.OData and Microsoft.AspNet.OData packages seem to overlap, so I wasn't sure which one to use. What are the differences between them? What are the pros and cons of each? 回答1: Microsoft.AspNet.OData is the one you'll most likely want to use for a new project. It sets up Web API to use the OData 4 protocol. Microsoft.AspNet.WebApi.OData is the older

C# OData Create (POST) Request with nested items

孤人 提交于 2021-02-05 07:39:56
问题 hoping I can have someone help me out with a problem I'm having. We're using a new product which interacts with our ERP system and exposes business objects through REST services using OData. They have some samples and everything which I've gone through but I'm stuck on a key process we're trying to use the product for, which is the creation of a sales document with many items in one request. I've got the backend working on the server side accepting the request as I can create a POST request

C# OData Create (POST) Request with nested items

旧时模样 提交于 2021-02-05 07:39:01
问题 hoping I can have someone help me out with a problem I'm having. We're using a new product which interacts with our ERP system and exposes business objects through REST services using OData. They have some samples and everything which I've gone through but I'm stuck on a key process we're trying to use the product for, which is the creation of a sales document with many items in one request. I've got the backend working on the server side accepting the request as I can create a POST request