odata

How to get ASP.Net Web API and OData to bind a string value as a key?

爷,独闯天下 提交于 2019-12-19 19:58:31
问题 I'm going through a short Web Api + OData tutorial from asp.net: http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/getting-started-with-odata-in-web-api/create-a-read-only-odata-endpoint. I downloaded the example project, and it works. But then I started playing around with the Product model that they use in the example. I added a new property to act as a key of type string instead of an integer key. The new Product.cs: public class Product { public string stringKey { get;

How to get ASP.Net Web API and OData to bind a string value as a key?

自古美人都是妖i 提交于 2019-12-19 19:58:17
问题 I'm going through a short Web Api + OData tutorial from asp.net: http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/getting-started-with-odata-in-web-api/create-a-read-only-odata-endpoint. I downloaded the example project, and it works. But then I started playing around with the Product model that they use in the example. I added a new property to act as a key of type string instead of an integer key. The new Product.cs: public class Product { public string stringKey { get;

MaxExpansionDepth with latest webapi and breeze

不打扰是莪最后的温柔 提交于 2019-12-19 16:23:12
问题 I have recently updated all of my nuget packages to the latest for EF6, breeze 1.4.5, system.web.http.odata 5.0.0.0, and all the other good bits available. Now, with one query that contains an expansion like x.y.z I get an error as follows: A first chance exception of type 'Microsoft.Data.OData.ODataException' occurred in System.Web.Http.OData.dll Additional information: The request includes a $expand path which is too deep. The maximum depth allowed is 2. To increase the limit, set the

隐藏数据透视表数据!Java版Excel文档处理控件Aspose.Cells这些不得不看的新功能

蹲街弑〆低调 提交于 2019-12-19 14:07:36
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> Aspose.Cells for Java( 点击下载 ) 是Excel电子表格处理API,开发人员可以在其自己的应用程序中嵌入读取,编写,操作,转换和打印电子表格的功能,而无需Microsoft Excel应用程序。 在最新发布的v19.11中,新增了许多非常有趣且实用的新功能,例如提供基于某些条件的排序和隐藏数据来获取报表和演示的紧凑信息,可以增强数据透视表的处理;使用QueryTable作为数据源读写表;检索OData连接信息等等。接下来我们用示例来演示如何实现这些新功能。 在数据透视表中排序和隐藏数据 在某些情况下,数据透视表中需要清晰的信息。我们可能需要某些功能来对数据透视表中的数据进行排序,然后根据某些条件隐藏行。以下示例代码演示了此功能: // The path to the output directory. String sourceDir = Utils.Get_SourceDirectory(); String outputDir = Utils.Get_OutputDirectory(); Workbook workbook = new Workbook(sourceDir + "PivotTableHideAndSortSample.xlsx"); Worksheet

Get OData $metadata in JSON format

六月ゝ 毕业季﹏ 提交于 2019-12-19 12:24:29
问题 is it possible to get metadata of an OData service in JSON format? When I try to use format=json , it doesn't work. Here is what I tried: http://odata.informea.org/services/odata.svc/$metadata/?format=json 回答1: The $metadata document is in the CSDL format, which currently only has an XML representation. (As a side note, if you do want to request the json format for a different kind of OData payload, make sure the format query token has a $ in front of it: $format=json .) So, no it is not

Swift 3 NTLM authentication

元气小坏坏 提交于 2019-12-19 11:21:02
问题 For a recent project I tried to pull some data from a server in the SOAP and oData format respectively, that is protected with a Microsoft NTLM authentication, and it has been a nightmare figuring out how to do it, none of the online examples really worked. 回答1: So here is my solution; I had to adapt, expand and combine a few different sources. I hope this helps someone in the future. // // ViewController.swift // ntlm // // Created by Kamik423 on 21.3.17. // Copyright © 2017 Kamik423 All

OData Model Not Working

 ̄綄美尐妖づ 提交于 2019-12-19 09:27:25
问题 I am trying to use expand option in my XML view but it's resulting no data. Data are coming from backend as I can see in debugging under 'Network' option but there seems to be some binding issue in XML view. Component.js sap.ui.define([ "sap/ui/core/UIComponent", "sap/ui/Device", "sem/stock_app/model/models" ], function(UIComponent, Device, models) { "use strict"; return UIComponent.extend("sem.stock_app.Component", { metadata: { manifest: "json" }, /** * The component is initialized by UI5

Upload file to SharePoint 2010 using PowerShell and the OData API

…衆ロ難τιáo~ 提交于 2019-12-19 08:51:29
问题 I'm attempting to upload a file to SharePoint 2010: Function Add-Attachments() { [CmdletBinding()] Param( [Parameter(Mandatory=$True)] [int]$Id, [Parameter(Mandatory=$True)] [string[]]$Paths ) BEGIN {} PROCESS { $url = "http://server/resource/_vti_bin/listdata.svc/TheList($Id)/Attachments" Foreach ($Path in $Paths) { Write-Verbose "Attaching $Path ..." $headers = @{ 'Slug' = "TheList|$Id|$(Split-Path $path -Leaf)" } $Payload = @{filename=(Split-Path $path -Leaf);filecontent=([IO.File]:

Dapper, ODATA, and IQueryable in ASP.NET

ぐ巨炮叔叔 提交于 2019-12-19 08:05:59
问题 I saw the great performance of Dapper and some samples of how to use it. I was wondering if I can use it to provide IQueryable data and integrate it with UI layer using ODATA to transfer data to the UI (like grids, lists,...). Is there any way to return Dapper objects AsQueryable instead of IEnumerable to query using ODATA? 回答1: No, not really. Well, you can wrap any sequence with .AsQueryable() if you really want, but it will just be using LINQ-to-Objects. Dapper is deliberately simple; it

Dapper, ODATA, and IQueryable in ASP.NET

偶尔善良 提交于 2019-12-19 08:05:50
问题 I saw the great performance of Dapper and some samples of how to use it. I was wondering if I can use it to provide IQueryable data and integrate it with UI layer using ODATA to transfer data to the UI (like grids, lists,...). Is there any way to return Dapper objects AsQueryable instead of IEnumerable to query using ODATA? 回答1: No, not really. Well, you can wrap any sequence with .AsQueryable() if you really want, but it will just be using LINQ-to-Objects. Dapper is deliberately simple; it