WebAPI and ODataController return 406 Not Acceptable
If you are using OData V4, replace using System.Web.Http.OData; With using Microsoft.AspNet.OData; (Please check the comments for the latest library) in the ODataController works for me.
If you are using OData V4, replace using System.Web.Http.OData; With using Microsoft.AspNet.OData; (Please check the comments for the latest library) in the ODataController works for me.
Edit: now available at https://www.nuget.org/packages/Microsoft.OData.Core/ It’s in the road map, OData Lib has released 7.0.0 which is a breaking change release, OData/WebAPI will release 6.0.0 based on this, after the release, we will consider to support ASP.NET Core. Relative issue: https://github.com/OData/WebApi/issues/772
I fixed this by reinstalling the NuGet package, which corrects broken dependencies. From the package manager, run: Update-Package Microsoft.AspNet.WebApi -reinstall
Create the path dynamically via the API createKey from the V2 ODataModel: const path = myODataV2Model.createKey(“/Products”, { // Key(s) and value(s) of that entity set “ProductID”: myVar1, // with the value 999 for example “AnotherKeyProperty”: “…”, }); myODataV2Model.update(path/*, …*/); Compared to concatenating strings for the path manually, createKey offers the following advantages: It outputs the … Read more
This is an interesting use case. Here’s my take: { “settings”: { “analysis”: { “analyzer”: { “my_ngram_analyzer”: { “tokenizer”: “my_ngram_tokenizer”, “filter”: [“lowercase”] }, “my_edge_ngram_analyzer”: { “tokenizer”: “my_edge_ngram_tokenizer”, “filter”: [“lowercase”] }, “my_reverse_edge_ngram_analyzer”: { “tokenizer”: “keyword”, “filter” : [“lowercase”,”reverse”,”substring”,”reverse”] }, “lowercase_keyword”: { “type”: “custom”, “filter”: [“lowercase”], “tokenizer”: “keyword” } }, “tokenizer”: { “my_ngram_tokenizer”: { “type”: “nGram”, “min_gram”: … Read more
There is no need for “hacky approaches” or custom formatters in case you simply want to display the time (or date) in a human readable form. UI5 comes with the concept data typesdoc which has the following advantages: Let UI5 format, parse, and even validate the value for you. Supports two-way data binding in contrast … Read more