当前位置:网站首页>The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities
The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities
2022-07-03 11:25:00 【Technology feast】
problem :
public List<string> GetpathsById(List<long> id){ long[] aa = id.ToArray(); long x; List<string> paths = new List<string>(); for (int i = 0; i < id.Count; i++) { x = id[i]; Presentation press = context.Presentations.Where(m => m.PresId == aa[i]).FirstOrDefault(); paths.Add(press.FilePath); } return paths;}
This code throws the following exception: The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities.
This code throws the following exception : The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities.
However, if I supply x
instead of aa[i]
it works. however , If I offer x
instead of aa[i]
It can work .
Why? Why? ?
Solution :
Reference resources : https://stackoom.com/en/question/Z3F6边栏推荐
- 高精度室内定位技术,在智慧工厂安全管理的应用
- Intel 13th generation core flagship exposure, single core 5.5ghz
- (2) Base
- 搭建ADG后,实例2无法启动 ORA-29760: instance_number parameter not specified
- After using the thread pool for so long, do you really know how to reasonably configure the number of threads?
- [VTK] vtkPolydataToImageStencil 源码解读
- Google Earth engine (GEE) -- when we use the front and back images to make up for the interpolation effect, what if there is no effect?
- ASP.NET-酒店管理系統
- Programmers' entrepreneurial trap: taking private jobs
- Lecture 1 number field
猜你喜欢
12. Nacos server service registration of source code analysis of Nacos service registration
Encapsulate a koa distributed locking middleware to solve the problem of idempotent or repeated requests
Hal - General
AMS Series 1 - AMS startup process
Google Earth Engine(GEE)——GHSL 全球人口网格数据集250米分辨率
Event preview | the live broadcast industry "rolled in" to drive new data growth points with product power
Redis things
历经一个月,终于拿到金蝶Offer!分享一下四面面经+复习资料
面試題總結(2) IO模型,集合,NIO 原理,緩存穿透,擊穿雪崩
After a month, I finally got Kingdee offer! Share tetrahedral Sutra + review materials
随机推荐
大厂技术专家:工程师如何提升沟通能力?
Inexplicable problems in the nesting of constraintlayout and relativelayout
DS90UB949
Probability theory: application of convolution in calculating moving average
Event preview | the live broadcast industry "rolled in" to drive new data growth points with product power
After using the thread pool for so long, do you really know how to reasonably configure the number of threads?
ASP.NET-酒店管理系统
Arctangent entropy: the latest SCI paper in July 2022
Leetcode 46: full arrangement
php服务器 与redis交互大量CLOSE_WAIT分析
Abandon the Internet after 00: don't want to enter a big factory after graduation, but go to the most fashionable Web3
搭建ADG后,实例2无法启动 ORA-29760: instance_number parameter not specified
Asyncio warning deprecationwarning: there is no current event loop
[vtk] source code interpretation of vtkpolydatatoimagestencil
AMS Series 1 - AMS startup process
2022-07-02: what is the output of the following go language code? A: Compilation error; B:Panic; C:NaN。 package main import “fmt“ func mai
POI excel 单元格换行
C语言二维数组
Résumé des questions d'entrevue (2) Modèle io, ensemble, principe NiO, pénétration du cache, avalanche de rupture
线性表顺序表综合应用题P18