odata

Save global attribute value when new session starts

坚强是说给别人听的谎言 提交于 2020-01-16 16:05:28
问题 I have two fields in SAP Fiori App: Template_ID and Offer_ID . I want to choose value in Offer_ID depending on Template_ID field value. For solving this problem I've tried to do this steps: When the user click on Template_ID field in Back-End runs the method: CL_CUAN_CAMPAIGN_DPC->contentset_get_entityset() . This method has returning paramater et_result . In et_result I have the necessary field temp_id . For saving temp_id value I created a global attribute in class ZCL_CUAN_CLASS . ZCL_CUAN

How to catch ODataErrorException when I am making an OData call through HttpWebRequest in C#?

心已入冬 提交于 2020-01-16 15:57:07
问题 I am trying to call an OData service from my .Net console application using c#. I am using HttpWebRequest to make the call. Now if there is an OData specific error, for example, an invalid JSON payload, then an ODataErrorException is thrown from the OData server. My question is how to catch that ODataErrorException and extract the proper message out of it? The exception gets caught in WebException catch block, and it only shows me "400 Bad Request". But it doesn't show me the actual error

.Net Core OData enable filtering for single entity set

*爱你&永不变心* 提交于 2020-01-15 15:27:07
问题 I'm running the Beta of OData on .Net Core. I'm trying to only enable certain features of odata depending on the controller. My startup class looks like so: services.AddOData(); //... app.UseMvc(routeBuilder => { //routeBuilder.Count().Filter().OrderBy().Expand().Select().MaxTop(null); routeBuilder.MapODataServiceRoute("odata", null, GetModel()); routeBuilder.EnableDependencyInjection(); }); public static IEdmModel GetModel() { var builder = new ODataConventionModelBuilder(); var skillSet =

OData Hangs Forever in Xamarin Form

别等时光非礼了梦想. 提交于 2020-01-15 12:24:25
问题 I am trying to fetch data from the Nortwind URL with using Simple.OData.Client in Xamarin form. Application hangs forever. The simple project source code is in the following link: Download using Simple.OData.Client; public async void InitializeDataService(){ try { mODataClient = new ODataClient("http://services.odata.org/Northwind/Northwind.svc/"); } catch { await DisplayAlert("Error", "Connection Error", "OK", "Cancel"); System.Diagnostics.Debug.WriteLine("ERROR!"); } } public async void

Table dynamic loading SAPUI5 / UI5

眉间皱痕 提交于 2020-01-15 03:56:28
问题 I want to display a huge set of data in a SAPUI5-Table component. I used to implement these datatables with dynamically loading, which means that the table initially loaded ~50 records. After the user scrolled down far enough, the next set of 50 records were loaded into the table. This way it was possible for me to display a table of more than 160.000 entries without any performance issues. Now I need to do the same with SAPUI5-Table. I already implemented the server side, the OData service

WebApi with Odata NextPage and Count not appearing in the JSON response

…衆ロ難τιáo~ 提交于 2020-01-15 03:17:32
问题 I have a webapi method that I want to switch oData paging etc on. I followed the example in http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/supporting-odata-query-options My method looks like: public PageResult<UserViewModel> GetUsers(ODataQueryOptions<UserViewModel> options) { var settings = new ODataQuerySettings() { PageSize = 2 }; var results = UserLogic.GetUsers(userId, UserManager, _db); var filtered = options.ApplyTo(results, settings); var pagedResult = new

OData Doesn't Recognize My Collection Properties

早过忘川 提交于 2020-01-14 09:22:26
问题 When I post a ShakeoutDocument without the collections populated, the OData Serializer understands the JSON & populates the ODataActionParameters correctly. However, when I add a child-record into either of the ShakeoutDocument's collection properties...the Odata Controller's ODataActionParameters parameter is null. I have narrowed it down to the OData EDM Model Configuration . How do I correctly "characterize" the collection properties (below) to the EDM Model Configuration THE CLASS LOOKS

Query with OData without exposing ORM models?

北城余情 提交于 2020-01-14 08:55:08
问题 In my web api 2 project, if I want to use OData library (which looks awesome and very tempting) for queries over some properties, that would force the client side to know the exact properties of my database models. Is this a good practice? Is there a way to avoid this decouple? For the following models: public class LetterEntity { public int Id {get; set;} public string Title {get; set;} public string Content {get; set;} public string Source {get; set;} public DateTime SendingTime {get; set;}

How is the GENERATED_ID created in a custom oData Service to feed an Analytical Table?

时光总嘲笑我的痴心妄想 提交于 2020-01-14 06:12:16
问题 In a custom oData Service I need an Entity that will feed an analytical Table in sapui5. The table should show the sum of the VBELN positions. The Entity collects already the VBELN positions and all the needed supplementary attributes and the data can be displayed in sapui5 in a Responsive Table. Now this Table has been changed to an analytical table and the annotations for aggregation, dimensions and measures were done in the DEFINE method of the MPC_EXT class. In SEGW a mapping was done

How to use Breeze with Generic Unit of Work and Repositories?

£可爱£侵袭症+ 提交于 2020-01-13 17:02:31
问题 Using this: https://genericunitofworkandrepositories.codeplex.com/ and the following set of blog posts: http://blog.longle.net/2013/05/11/genericizing-the-unit-of-work-pattern-repository-pattern-with-entity-framework-in-mvc/ We are trying to use those repositories with Breeze since it handles client side javascript and OData very well. I was wondering how we could use these with Breeze to handle overriding the BeforeSaveEntity correctly. We have quite a bit of business logic that needs to