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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/list/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
C# 我可以在实体框架中从表转换为列表吗_C#_Entity Framework_List - Fatal编程技术网

C# 我可以在实体框架中从表转换为列表吗

C# 我可以在实体框架中从表转换为列表吗,c#,entity-framework,list,C#,Entity Framework,List,有没有一种简单的方法可以将所有表数据转换为列表?有点像: DbContext.Users.tolist() 确保添加 using System.Linq; 写ToList(),它应该能工作。但我怀疑这不是你真正的问题。更清楚一点。很抱歉,我应该提到我正在使用asp.net5,但该功能不存在 using System.Linq;

有没有一种简单的方法可以将所有表数据转换为列表?有点像:

DbContext.Users.tolist()

确保添加

using System.Linq;

ToList()
,它应该能工作。但我怀疑这不是你真正的问题。更清楚一点。很抱歉,我应该提到我正在使用asp.net5,但该功能不存在
using System.Linq;