odata

Is there a way to represent summary rows with OData?

柔情痞子 提交于 2019-12-11 19:24:40
问题 I'm trying to tack on additional information to the list of items returned from an ODataController 's method. The use case is summary rows. So we basically want to return the rows of the report and then also additional info with totals, sub-totals, etc. So, basically starting with this method: public PageResult<MyReportLine> Get(ODataQueryOptions odataQueryOptions) I tried wrapping MyReportLine in MyReport public class MyReport { IEnumerable<MyReportLine> _myReportLines; MySummaryRow

WCF OData for multiplatform development?

隐身守侯 提交于 2019-12-11 19:13:58
问题 The OP in this question asks about using an WCF/OData as an internal data access layer. Arguments of using WCF/OData as access layer instead of EF/L2S/nHibernate directly The resounding reply seems to be don't do it. I'm in similar position to the OP, but have a concern not raised in the original question. I'm trying to develop (natively) for a lot of different platforms but want to keep as much of the data and business logic server side as possible. So I'll have iOS/Android/Web (MVC)/Desktop

SAPUI5 OData Binding not refreshing on route navigation

家住魔仙堡 提交于 2019-12-11 18:54:20
问题 For a SAPUI5 app I created an OData service having an entity "Enquiries". The service itself works fine. In order to build a first SAPUI5 app on top of that service, I took the Walkthrough to get the basics: https://sapui5.hana.ondemand.com/#/topic/2366345a94f64ec1a80f9d9ce50a59ef Now if I replace the Northwind Service by my one service and binding it as model "enquiry", it all works fine except one thing. When clicking on an list item ("enquiry/>Enquiries"), it loads the details of that

How to pass a NULL value to a WCF Data Services' service operation?

烂漫一生 提交于 2019-12-11 18:19:41
问题 I have a WCF data services' service operation such as [WebGet(UriTemplate = "GetData")] public IQueryable<string> GetData(int code, int deviceid, int groupId, DateTime dateTimeFrom, DateTime dateTimeTo) { ... } I am calling this service operation by sending a HTTP request to the server in this format: http://localhost:6000/GetData?code=0&deviceId=1&groupId=0L&dateTimeFrom=datetime'2013-01-31T15:36:50.904'&dateTimeTo=datetime'2012-02-01T15:36:50.904' and it is working like a charm. Now I want

How to add custom function to AbpODataEntityController?

删除回忆录丶 提交于 2019-12-11 16:47:22
问题 In a recent post, there is some suggestion about how to add a custom function to an AbpODataEntityController . I have tried but I can't achieve what I want. For example, in my AbpODataEntityController , there are two methods called Test and EchoTest . public class TownsController : AbpODataEntityController<Town>, ITransientDependency { public TownsController(IRepository<Town> repository) : base(repository) { } // [HttpPost] public string Test() { return "inanc"; } // [HttpPost] // [HttpGet]

How to handle number format of OData Edm.Decimal in sapui5 correct?

南笙酒味 提交于 2019-12-11 16:42:06
问题 It looks like OData sends Edm.Decimal as "String" also containing the decimal separator. Question: What should be send by OData? Always the same values (for example separator with ".")? Question: How can this data be bound to SAPUI5 control with an automatic locale handling? I am already using new sap.ui.model.resource.ResourceModel({ But numbers are always shown with a dot as separator. 回答1: I think there is a bug in sap.ui.model.type.Float implementation. You can use that data type to

Web API OData ignore properties added by client-side

时光总嘲笑我的痴心妄想 提交于 2019-12-11 16:08:31
问题 I get an error when I call Put to my server using WebApi Odata v4. { "error": { "code": "", "message": "The request is invalid.", "innererror": { "message": "job : The property 'test' does not exist on type 'Model.Temp'. Make sure to only use property names that are defined by the type.\r\n", "type": "", "stacktrace": "" } } } this error happens because the property "test" is not set in the Model "Temp". it is actually added by javascript, and only used in client-side How do I make so that

OData Select Syntax for Field SubString

流过昼夜 提交于 2019-12-11 16:03:49
问题 Im pulling data across the line for a listing. Is there a way in OData syntax to only pull the first 100 characters of a field. e.g. EmployeeDescription field, I only want to show the first 100 characters of a Nvarchar(1000) database field. Am trying to cut down as much as possible data going across the line. Thanks 回答1: Currently there's no support for such query. The projections feature ($select) only allows you to select which properties to get, but you will get the entire property value

SAPUI5 ValueHelpDialog Cells Empty

半腔热情 提交于 2019-12-11 15:35:22
问题 I'm very new to coding and to StackOverflow. I'm trying to create a sapui5 Value Help Dialog ( class sap.ui.comp.valuehelpdialog.ValueHelpDialog ) that is supposed to end up filtering search requests from a user table in the SAP backend service. Right now, I can't even get it to display my mockdata properly. The mockdata consists of a "Personen.json" with an array of users with the following fields like this example snippet: [{ "BewId": "2123456789", "Posno": 1, "PNumber": "P87879876",

Add a function or parameter to OData controller

╄→尐↘猪︶ㄣ 提交于 2019-12-11 15:14:24
问题 I'm using ASP.NET Boilerplate framework for ASP.NET Core. I have the boilerplate OData controllers as per https://aspnetboilerplate.com/Pages/Documents/OData-AspNetCore-Integration. I want to support passing of a custom parameter in either the GET method or in a custom OData function. How do I do this in the AbpODataEntityController ? Regards, David 回答1: Looking at the source code, it looks like they are using the standard "Microsoft.AspNet.OData" Version="7.1.0". So you probably have a place