Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/entity-framework/4.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
Asp.net mvc 实体框架DataServiceCollection加载不工作_Asp.net Mvc_Entity Framework_C# 4.0 - Fatal编程技术网

Asp.net mvc 实体框架DataServiceCollection加载不工作

Asp.net mvc 实体框架DataServiceCollection加载不工作,asp.net-mvc,entity-framework,c#-4.0,Asp.net Mvc,Entity Framework,C# 4.0,我有单独的服务和UI项目 我使用实体框架来获取和显示数据。服务器返回计数为5000的数据列表 在UI中,我完成了以下操作: DataServiceCollection<ENTITYT> entityCollection = new DataServiceCollection<ENTITYT>(); Container proxy = new Container(uri); var container = new ServiceReference1.Container(ur

我有单独的服务和UI项目

我使用实体框架来获取和显示数据。服务器返回计数为5000的数据列表

在UI中,我完成了以下操作:

DataServiceCollection<ENTITYT> entityCollection = new DataServiceCollection<ENTITYT>();
Container proxy = new Container(uri);
var container = new ServiceReference1.Container(uri);
entityCollection.Load(container.Entities);
DataServiceCollection entityCollection=new DataServiceCollection();
容器代理=新容器(uri);
var container=newservicerence1.container(uri);
entityCollection.Load(container.Entities);
entityCollection计数显示为1。这就是问题所在。 url点击Get函数,该函数返回5000条记录的列表


请提出解决方案。

刚刚想出了解决方案!很高兴你明白了。您应该在下面发布解决方案,并将其作为答案接受,以便其他人可以使用它作为将来的参考。