System.Core error: "Code supposed to be unreachable" using C# Entity Framework and Linq with Expression

c# entity-framework entity-framework-6 linq-expressions linq-to-entities

Popular Answer

The method call may be stored in a variable outside the query expression tree and used within as a workaround by:

var accountFilter = this.AccountSecurity(p_UserKey);
var qry = from cs in this.DbContext.CompanySet
          .Where(c => c.Accounts.AsQueryable().Any(accountFilter))
          select cs;
return qry.ToList();
6
11/1/2017 9:39:36 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow