odata

Breeze | datajs - no handler for data

自古美人都是妖i 提交于 2019-12-13 05:47:35
问题 I am new in breeze world, but I want use it in my application. I tried test it with simple ASP.Net Api OData service based on Northwind.sdf database. In DataService project I have a simple controller: [BreezeController] public class CategoriesController : ODataController { readonly EFContextProvider<NORTHWNDContext> contextProvider = new EFContextProvider<NORTHWNDContext>(); [HttpGet] [EnableBreezeQuery] public IQueryable<Category> GetCategories() { return contextProvider.Context.Categories;

Problems with jaydata basic authentication

允我心安 提交于 2019-12-13 05:30:38
问题 Jaydata & Javascript noobie. I'm having problems with jaydata and basic authentication, can't seem to get it to work. I specify user and password but the headers never contains an auth line. Jaydata version is 1.3.6 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript" src="/scripts/jquery-1.11.0.js"></script> <script type="text/javascript" src="/scripts/datajs-1.0.3.js"></script> <script type="text/javascript" src="/scripts/jaydata

Expanding navigation properties with ODataQueryOptions

只愿长相守 提交于 2019-12-13 05:16:33
问题 I'm building an OData v.4 web service that must expose data retrieved from another 3rd party web source, so the data doesn't resemble anything from LINQ world, i.e.: no IQueryable, no Context, no whatever.. The way to go seems to be manually processing parameters from ODataQueryOptions and returning simple sequence of items. So, controller method should look something like this: class MyMasterEntity { [Contained] public IEnumerable<MyDetailEntity> Details { get; set; } } // [EnableQuery]

How do I generate an absolute OData URL for a given entity type?

心不动则不痛 提交于 2019-12-13 05:12:29
问题 I have a working OData implementation with routes setup in the typical way: var builder = new ODataConventionModelBuilder(); builder.EntitySet<Person>("People"); configuration.Routes.MapODataRoute(routeName:"OData", routePrefix:"odata", model:builder.GetEdmModel()); I'm looking for a way to programatically generate an absolute URL for a registered entity set from outside of any OData action . For example, I want to request the OData endpoint for the Person type and get back "http://host/odata

odata v4 Product({key})/GenerateVariants route misconfiguration

℡╲_俬逩灬. 提交于 2019-12-13 04:44:14
问题 There is a function on product that generates the variants as a list. Currently it returns: The related entity set could not be found from the OData path This is my WebApiConfig: builder.EntityType<Product>().Function("GenerateVariants").Returns<List<ProductVariant>>(); ////.Parameter<string>("save").OptionalParameter = true; This is my method on the ProductController //http://localhost:26696/odata/Products(b2a35842-7b68-e511-beda-6c71d92133bc)/GenerateVariants [HttpGet] [ODataRoute("Products

How to select property from expanded property? ReceivedCalls/Caller?$select=Email' is not valid in a $select or $expand expression

好久不见. 提交于 2019-12-13 04:32:15
问题 I have a class: Person which has property public virtual ICollection<Call> ReceivedCalls { get; set; } Then the Call is : public class Call { public int Id { get; set; } public virtual Person Callee { get; set; } public virtual ApplicationUser Caller { get; set; } public DateTime TimeStamp { get; set; } } I have a PersonController and CallsController (both are scaffolded WEB API OData controllers). I can fetch people and their calls (and who called) by the link: http://localhost:17697/odata

Updating Navigation Property in oData WebAPI

匆匆过客 提交于 2019-12-13 04:31:41
问题 I am using WebAPI oData. The requirement is to update the Navigation property of the entity. public class Question { public int QuestionId { get; set; } public string QuestionTitle { get; set; } public string QuestionBody { get; set; } public List<Response> Responses { get; set; } //navigation property } public class Response { public string ResponseId { get; set; } public int QuestionId { get; set; } //fk public string ResponseBody { get; set; } } Now if I use the following link to fetch the

Failing to build ODataCppClient for iOS, can't find files

穿精又带淫゛_ 提交于 2019-12-13 03:43:43
问题 I need to use Odata in one of my project. I found the latest OData open source at https://github.com/OData/odatacpp-client but I could not build it successfully for iOS. I ran following commands as mentioned in README.md: cd odatacpp mkdir lib cd lib git clone https://git01.codeplex.com/casablanca cd casablanca git checkout v2.1.0 mkdir build.release cd build.release cmake ../Release -DCMAKE_BUILD_TYPE=Release make -j 4 cd ../../.. cmake -DCMAKE_BUILD_TYPE=Debug # replace 'Debug' with

How to find out which records have been filtered out by Queryable attribute?

只愿长相守 提交于 2019-12-13 03:39:47
问题 I have an asp.net web api controller for which I have enabled odata query options. The controller is as follows: [Queryable(PageSize = 10)] public IQueryable<MyDTO> Get(string Id) { //some code here } As obvious from the Queryable attribute, this controller always returns 10 records at a time if there are more than 10 MyDTO's . How can I find out which 10 records have been returned or which records have been filtered out by odata query option? 回答1: All pageSize does is do a Take on the

SAPUI5 Application login with the Backend and get Data

帅比萌擦擦* 提交于 2019-12-13 02:35:26
问题 I asked a similar question before but didn't get a right answer because my question was not meaningful or not understandable. so I try it again.. My Problem is I don't understand how the login works. My Situation: I have created a full Application it works, also with the backend. My destination is connected to the Cloud Connector .. and it is deployed on the SAP Cloud platform. It works all with the Odata and the SAP GATEWAY Client For now, I log in with my SAP login data in the application.