romantitov / MockQueryable

Mocking Entity Framework Core operations such ToListAsync, FirstOrDefaultAsync etc
MIT License
791 stars 77 forks source link

After upgrade it does not work with EF.Functions.Like #48

Closed risogolo closed 3 years ago

risogolo commented 3 years ago

I have updated my project from .NET core 3x to .NET 5, also updated Moq and MockQueryable for Moq and Im getting

System.InvalidOperationException : The 'Like' method is not supported because the query has switched to client-evaluation. This usually happens when the arguments to the method cannot be translated to server. Rewrite the query to avoid client evaluation of arguments so that method can be translated to server.

risogolo commented 3 years ago

Problem in EF