Dropdown filter function error

Hi,
When creating a FK dropdown with AllowFiltering enabled I am getting the following error. Tested in a simple (no changes to generated application) application give the same error type.
Bug/am I doing something wrong?
Many thanks

Unhandled exception rendering component: The LINQ expression 'DbSet()
.Where(c => c.FirstName.ToString().Contains("M"))' could not be translated.
Additional information: Translation of method 'string.ToString' failed.
If this method can be mapped to your custom function, see New feature topic: custom function mapping ยท Issue #500 ยท dotnet/EntityFramework.Docs ยท GitHub for more information.
Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable',
'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See Client vs. Server Evaluation - EF Core | Microsoft Docs for more information.

1 Like

Hi @Graeme_Atkinson,

This looks like a bug! We will do our best to provide fix for this later today!

I've got the exact same problem... :grimacing:

System.InvalidOperationException: The LINQ expression 'DbSet()
.Where(v => v.renaam.ToString().Contains("Club"))' could not be translated. Additional information: Translation of method 'string.ToString' failed.

The issue is fixed and it will be released before the end of this week.

1 Like