restier

RESTier OData Function returning EntitySet. “The related entity set could not be found from the OData path”

家住魔仙堡 提交于 2020-01-17 12:25:10
问题 Added a function on RESTier OData var ambilLocationsByMarketId = new EdmAction(ns, "AmbilLocationsByMarketId", location.GetEdmTypeReference(true), false, null); model.AddElement(ambilLocationsByMarketId); var entityContainer = (EdmEntityContainer)model.EntityContainer; entityContainer.AddActionImport("AmbilLocationsByMarketId", ambilLocationsByMarketId); Implemented the custom function in my DomainController [HttpGet] [EnableQuery] [ODataRoute("AmbilLocationsByMarketId")] public

RESTier OData Function returning EntitySet. “The related entity set could not be found from the OData path”

旧巷老猫 提交于 2020-01-17 12:24:08
问题 Added a function on RESTier OData var ambilLocationsByMarketId = new EdmAction(ns, "AmbilLocationsByMarketId", location.GetEdmTypeReference(true), false, null); model.AddElement(ambilLocationsByMarketId); var entityContainer = (EdmEntityContainer)model.EntityContainer; entityContainer.AddActionImport("AmbilLocationsByMarketId", ambilLocationsByMarketId); Implemented the custom function in my DomainController [HttpGet] [EnableQuery] [ODataRoute("AmbilLocationsByMarketId")] public

Angularjs: Why does adding an authorization header cause a -1 status response?

时光毁灭记忆、已成空白 提交于 2020-01-07 02:50:31
问题 I have a pre-existing angular code that gets data from an API. I'm trying to add an authentication token to the request. To begin with I tried a simple example .factory('getDep', [ '$resource', function($resource) { return $resource('/ContactsDatabaseAPI/deps/:id', { id: '@id' }, { query: { method: 'GET', isArray: false, headers: { 'Authorization': 'Bearer ' + token } }, create: { method: 'POST' }, update: { method: 'PUT' }, remove: { method: 'DELETE' } }); } When the GET call is fired, and