当前位置:网站首页>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边栏推荐
- Matlab extracts numerical data from irregular txt files (simple and practical)
- JGG专刊征稿:时空组学
- After a month, I finally got Kingdee offer! Share tetrahedral Sutra + review materials
- The five-year itch of software testing engineers tells the experience of breaking through bottlenecks for two years
- Incremental database backup - DB incr DB full
- 高精度室内定位技术,在智慧工厂安全管理的应用
- 今晚要修稿子準備發佈。但是,仍卡在這裡,也許你需要的是一個段子。
- 面試題總結(2) IO模型,集合,NIO 原理,緩存穿透,擊穿雪崩
- 2022 东北四省赛 VP记录/补题
- 项目管理精华读书笔记(六)
猜你喜欢
C language AES encryption and decryption
MATLAB提取不規則txt文件中的數值數據(簡單且實用)
MATLAB extrait les données numériques d'un fichier txt irrégulier (simple et pratique)
Gut | Yu Jun group of the Chinese University of Hong Kong revealed that smoking changes intestinal flora and promotes colorectal cancer (do not smoke)
一文搞懂Go语言Context
Google Earth engine (GEE) - ghsl global population grid dataset 250 meter resolution
After using the thread pool for so long, do you really know how to reasonably configure the number of threads?
Hal - General
Cuiyusong, CTO of youzan: the core goal of Jarvis is to make products smarter and more reliable
Arctangent entropy: the latest SCI paper in July 2022
随机推荐
Processes and threads
Tablespace creation management and control file management
[proteus simulation] 16 channel water lamp composed of 74hc154 four wire to 12 wire decoder
Hal -- writing hardware drivers
Lecture 1 number field
Abandon the Internet after 00: don't want to enter a big factory after graduation, but go to the most fashionable Web3
[vtk] source code interpretation of vtkpolydatatoimagestencil
反正切熵(Arctangent entropy):2022.7月最新SCI论文
Expandablelistview that can expand and shrink (imitating the list page of professional selection of Zhilian recruitment)
[VTK] vtkWindowedSincPolyDataFilter 源码注释解读
2. Hal hardware abstraction layer
ASP.NET-酒店管理系统
Google Earth Engine(GEE)——GHSL 全球人口网格数据集250米分辨率
Struct function & function pointer
FL Studio 20 unlimited trial fruit arranger Download
1. Hal driven development
Using onvif protocol to operate the device
AMS series - application startup process
帝国cms 无缩略图 灵动标签(e:loop)判断有无标题图片(titlepic)的两种写法
Kotlin's use of the no Arg compiler plug-in in gradle