OData中的自定义类型URL

时间:2016-10-24 12:48:19

标签: c# odata

我正在根据DynamicEdmModelCreation example准备 OData服务

根据我的应用程序中定义的数据类型,我动态创建 EdmEntityType 实例 - 每种类型一个。

当调用根地址时,我得到了所有可用集合的列表。 每个集合包含 name kind URL 。我注意到名称和URL总是一样的。

如何制作自定义网址?

而不是:

{
  "@odata.context":"http://localhost:12345/odata/anotherdatasource/$metadata","value":[
    {
      "name":"Students","kind":"EntitySet","url":"Students"
    }
  ]
}

我想得到:

{
  "@odata.context":"http://localhost:12345/odata/anotherdatasource/$metadata","value":[
    {
      "name":"Students","kind":"EntitySet","url":"CompletelyDifferentURL"
    }
  ]
}

0 个答案:

没有答案
相关问题