The LINQ expression node type ‘ArrayIndex’ is not supported in LINQ to Entities
To fix this use a temporary variable: var tmp = aa[i]; … m => m.PresId == tmp In your where clause you have m => m.PresId == aa[i] which is a way of expressing a lambda expression. When that is converted to an expression, then converted into a query on your database it finds the … Read more