odata

Application Insights API $select not returning all results when values share part of path

社会主义新天地 提交于 2019-12-11 06:35:14
问题 I'm not sure if this is an OData issue or an Application Insights issue, but the App Insights API is not giving me all of the values I selected. It works normally most of the time, but when I ask for two values that share the beginning of their path, it only gives me the second value I asked for. Here's an example of my issue: data: { "count": 1, "type": "customEvent", "customDimensions": { "success": "true", "version": "ver-1" }, "other": { "key": "val-1" } }, { "count": 2, "type":

How do I bind multiple entity sets to one odata controller?

允我心安 提交于 2019-12-11 06:09:13
问题 I have a lot of different entities that I want to enable OData for. These entities are categorized into different groups based on their type. Currently, the default is to match the EntitySet with the controller name, but I don't want a controller for every entity type that I'll have. Is there a way I can map multiple EntitySets to one controller. I've tried having the types I'm interested in implement a common interface and specified that interface as my entity set type. I also tried having

How to prevent HTTP 404 for a custom action in an odata controller?

烈酒焚心 提交于 2019-12-11 06:05:12
问题 I have an ASP.Net WebApi2 project hosting odata both ApiController and ODataController . And I want to add a custom action in an ODataController . I saw this seems to be achievable by either adding [HttpPost] attribute on the desired action, or by configuring the ODataConventionModelBuilder with a specific FunctionConfiguration when using the MapODataServiceRoute. To distinguish between odata routes and webapi routes we use the following scheme : odata : http://localhost:9292/myProject/odata

SAPUI5 create multiple value(batch) using post

纵饮孤独 提交于 2019-12-11 05:46:56
问题 To post data in the SAP Back-end I use: oModel.create("/Dummyset", oEntry); //so far it works fine Now I have multiple lines in my oEntry and it doesn't work. I found the following solution aBatchOperation.push(contactBatchOperation); oModel.addBatchChangeOperations(aBatchOperation); oModel.submitBatch(fSuccess,fError,true); But unfortunately it's not working with my OData version 2.0 . I always get an error as "addBatchChangeOperations is not a function" Then I tried to find out which

Need to implement a Elastic search query with both $select and $filter

亡梦爱人 提交于 2019-12-11 05:45:41
问题 I have a Odata Query : /ecommerceadmin/ODataService.svc/search?$select=status&$filter=id eq 'test.com'and name eq 'abc' How can I implement the code in elastic search to get the data accordingly.What method in SearchSourceBuilder should be used? 回答1: You can probably easily get away with one match and one term query like this: import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.index.query.QueryBuilders.*; BoolQueryBuilder query = QueryBuilders.boolQuery() .must

BreezeControllerAttribute exception: Could not load file or assembly 'System.Net.Http

限于喜欢 提交于 2019-12-11 05:43:10
问题 When I make a call to an API an error is displayed: "Could not load file or assembly 'System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.", Code I have a base controller for my APIs [BreezeNHController] public class baseApiController<T> : ApiController where T : class, IEntity { public IRepository<T> Repositorio { get; private set; } [HttpGet, BreezeNHQueryable(AllowedQueryOptions =

Fail when load OData in SAPUI5

别来无恙 提交于 2019-12-11 05:10:19
问题 I have configured the information for accessing my OData Service from SAP UI5 in the manifest.json { "sap.app": { ... }, "dataSources": { "Test": { "uri": "/sap/opu/odata/sap/ZHCM_SRV/", "type": "OData", "settings": { "odataVersion": "2.0", "localUri": "localService/metadata.xml" } } } ... "sap.ui5": { "rootView": { "viewName": "test.view.App", "type": "XML", "id": "app" }, ... "models": { "i18n": { "type": "sap.ui.model.resource.ResourceModel", "settings": { "bundleName": "test.i18n.i18n" }

How to use substringof in azure-mobile-apps-js-client

↘锁芯ラ 提交于 2019-12-11 04:59:02
问题 I want to make use of odata substringof method using azure-mobile-apps-js-client. Currently I use indexof method but want to switch to substringof. I have this code function queryFunction(term){ return this.FullName.indexOf(term) != -1 } table.where(queryFunction, term) Which translates to $filter=indexof(FullName, term) ne -1 I need URL like this: filter=substringof(term, FullName) eq true How do I do that with javascript ? 回答1: azure-query-js supports a limited set of Javascript functions

ODataQueryOptions not being applied

China☆狼群 提交于 2019-12-11 04:36:01
问题 I may be missing something simple but based on this blog post: http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/supporting-odata-query-options this should be working. I have the following controller method: public virtual IQueryable<DtoAgent> Get(ODataQueryOptions<Agent> options, bool includeInactive = false, bool includeDeleted = false) { IQueryable<Agent> agents = null; if (includeDeleted && includeInactive) { agents = agentRepository.FindAll(); } else if (includeDeleted)

OData v4.0 - How can I use the support for $crossjoin?

[亡魂溺海] 提交于 2019-12-11 04:34:28
问题 I need to use a support for $crossjoin follow as [http://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/cs01/odata-data-aggregation-ext-v4.0-cs01.html#_Toc378326314] E.g. ~/$crossjoin(Products,Sales)?$filter=Products/ID eq Sales/ProductID I have investigated some references and source code: WebApi and odata.net [https://github.com/OData] But I've yet to find the support for $crossjoin, the ODataPathHandler cannot parse URI to ODataPath contains $crossjoin. I'm not sure that I didn