Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# OData$扩展URL限制?_C#_Entity Framework 6_Odata_Wcf Data Services_Service Reference - Fatal编程技术网

C# OData$扩展URL限制?

C# OData$扩展URL限制?,c#,entity-framework-6,odata,wcf-data-services,service-reference,C#,Entity Framework 6,Odata,Wcf Data Services,Service Reference,当您有大量(本例中为20个)导航属性要扩展时,如何通过服务引用来扩展实体的导航属性?我正在执行以下代码: var result = MyEntities.Sample.Expand("Collector,Container,Coordinates...") 这将导致以下URI: http://192.168.0.196/Service.svc/Sample?$expand=Collector,Container,Coordinates,DispositionRequest,Employee,

当您有大量(本例中为20个)导航属性要扩展时,如何通过服务引用来扩展实体的导航属性?我正在执行以下代码:

var result = MyEntities.Sample.Expand("Collector,Container,Coordinates...") 
这将导致以下URI:

http://192.168.0.196/Service.svc/Sample?$expand=Collector,Container,Coordinates,DispositionRequest,Employee,EstimatedSampleVolume,Facility,PreparationSize,Priority,Product,SourceLocation,SampleClassification,Unit,Vendor,Unit,WorkOrder,SampleType,Subject,Site,State
我得到的错误是:

$expand does not support '19' properties expanded simultaneously on the same segment.

OData协议目前不支持13个以上的同时扩展属性


从代码中,我们可以看到13不受支持,您想尝试WebAPI/OData V4还是Restier?有趣的是,我真的认为我做错了什么……我想我别无选择,只能使用另一种方法。我将对WebAPI/OData进行一些研究。谢谢