English 中文(简体)
OData 过滤器子座标适用于示意图清单
原标题:OData $filter substringof applied to a list of strings

我有一个伙伴关系。 NET Web AP 载有<代码>可计量(Of String)的主计长——这份说明清单。 这些领域按千分之十排列,因此,我使用<条码>,<>美元和<条码>,但只获得一档——即行罚款。

现在,我试图通过OData substringof (我的desc ,Property)滤来过滤这些结果。 你们可以看到,这要求我通过一个<>Property名字,以便过滤。 然而,由于我回到了护卫名单,我实际上没有任何财产可以过滤。

This causes the server to return errors like No property or field tostring exists in type String - when called with $filter=substringof( asd ,tostring).

如果我把电话改为$filter=substringof(d ,,则不会出现任何错误,而不会产生任何结果。

我的问题是,我是否能够以某种方式将<条码>(过滤器)操作者排在我方位名单上,而不寻找财产/地点,或者我是否必须宣布一个拥有单一财产的类别,只是为了能够进行过滤?

最佳回答

自我上次作出答复以来,情况发生了变化。 OData V3支持用美元收集原始物品。 Asp.net Web AP也支持这一辛奈。 例如,在你的控制人员中,你可以返回<代码>。 IQueryable<string> 并发出类似请求

(单位:美元)

缩略语

etc. You can also expose collections of other primitives like IQueryable etc.

问题回答

不幸的是,宣布单一财产的等级似乎是我可以认为的唯一解决办法。 <代码>OData filter n t对this para amount in C#

另一种不太明显的做法,是暴露出代表清单的计算加固价值,然后可以用来作为单一财产价值质疑清单。





相关问题
IEnumerable to array of parameter

Using linq? and XML is there a way to convert this IEnumerable to a string array of the value parameter? List<string> idList = new List<string>(); foreach (XElement idElement in word....

linq query for tag system - search for multiple tags

I have two tables, Tags(tagid, postid, tagname) and posts(postid, name, ...) now i want to make a query that returns me all posts that have a generic amount of tags. like: i want all posts that have ...

Linq operations against a List of Hashtables?

I m working with a set of legacy DAO code that returns an IList, where each Hashtable represents the row of a dynamically executed SQL query. For example, the List might contain the following records/...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

How to filter duplicate list items

i have list of items IList with data that looks list this: GenId TestMode 1 0 1 1 3 0 3 1 4 NULL 2 NULL i want to remove the index ...

C# Grouping/Sorting a Generic List<> using LINQ

Im looking to group and sort a Generic List<>. I have a list of objects representing files and each of these objects has a FileName, FileType and FileDate property. FileType is defined as an ...

热门标签