我试图在Entity Framework Core 3.1中使用类似线索。我的代码是这样的:
List<NormalAccount> normalAccounts = _context.Accounts.OfType<NormalAccount>()
.Where(c => EF.Functions.Like(c.AccountName,mysearchtext))
.Skip(offset)
.Take(limit)
.ToList();
我有例外
LINQ to Entities无法识别方法'Boolean Like(Microsoft.EntityFrameworkCore.DbFunctions,System.String,System.String)'方法,并且该方法无法转换为商店表达式。
出什么问题了?