结合 startsWith 和 all in odata 查询

问题描述 投票:0回答:0

我正在做一个项目,需要我从支持 Odata 的 API 查询一些数据。

数据看起来像这样(简化):

public class Student
{
  public string Name {get; set;}
  public List<Parent> parents {get; set;}
}

public class Parent
{
  public string Name {get; set;}
}

我需要查询的数据是:“任何一个父母姓名以'x'开头的学生”。

我已经尝试过几种方法,例如:

$filter=startswith(student/parent/all(parent : parent/name, 'X')

但我似乎无法让它工作。 当然我错过了什么,但我不知道它是什么。

对此有什么建议吗?

提前致谢。

c# rest odata
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.