当前位置:网站首页>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边栏推荐
- How PHP solves the problem of high concurrency
- 高精度室内定位技术,在智慧工厂安全管理的应用
- Expandablelistview that can expand and shrink (imitating the list page of professional selection of Zhilian recruitment)
- Linear table sequence table comprehensive application problem p18
- C语言日志库zlog基本使用
- After using the thread pool for so long, do you really know how to reasonably configure the number of threads?
- P3250 [HNOI2016] 网络 + [NECPC2022] F.Tree Path 树剖+线段树维护堆
- Solve undefined reference to`__ aeabi_ Uidivmod 'and undefined reference to`__ aeabi_ Uidiv 'error
- Commonly used discrete random distribution
- MATLAB提取不規則txt文件中的數值數據(簡單且實用)
猜你喜欢

Processes and threads

Unity移动端游戏性能优化简谱之 画面表现与GPU压力的权衡

Hal - General

Application of high-precision indoor positioning technology in safety management of smart factory

C语言 AES加解密

行业唯一!法大大电子合同上榜36氪硬核科技企业

Incremental database backup - DB incr DB full

Probability theory: application of convolution in calculating moving average

2022 东北四省赛 VP记录/补题

Tencent micro app to get wechat user information
随机推荐
Unique in the industry! Fada electronic contract is on the list of 36 krypton hard core technology enterprises
2. Hal hardware abstraction layer
Matlab extracts numerical data from irregular txt files (simple and practical)
Intel 13th generation core flagship exposure, single core 5.5ghz
Using activity to realize a simple inputable dialog box
Leetcode 46: full arrangement
软件测试周刊(第78期):你对未来越有信心,你对现在越有耐心。
Multi dimensional monitoring: the data base of intelligent monitoring
Project management essence reading notes (VII)
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
表空间创建管理及控制文件管理
MATLAB extrait les données numériques d'un fichier txt irrégulier (simple et pratique)
How to become a senior digital IC Design Engineer (1-4) Verilog coding syntax: expression
Analysis of JMM memory model
After a month, I finally got Kingdee offer! Share tetrahedral Sutra + review materials
今晚要修稿子準備發佈。但是,仍卡在這裡,也許你需要的是一個段子。
Solve undefined reference to`__ aeabi_ Uidivmod 'and undefined reference to`__ aeabi_ Uidiv 'error
[OBS] encapsulate the basic process of OBS acquisition
Reading notes: heart like Bodhi, Cao Dewang
如何清理v$rman_backup_job_details视图 报错ORA-02030