The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities

后端 未结 6 1641
离开以前
离开以前 2020-11-30 08:16
public List GetpathsById(List id)
{
    long[] aa = id.ToArray();
        long x;
    List paths = new List();
         


        
6条回答
  •  无人及你
    2020-11-30 08:59

    Can be simplified to avoid the error:

    public List GetpathsById(List id)
    {
        return context.Presentations.Where(x => id.Contains(x.PresId)).Select(x => x.FilePath).ToList();
    }
    

提交回复
热议问题