zzzprojects/EntityFramework.DynamicFilters

Error with Enum in filter

Closed this issue · 2 comments

I'm trying to set up a simple approval workflow built into some of my tables, and have the following filter set up to exclude any entries that aren't suggestions:

modelBuilder.Filter(ExcludeSuggestionFilterName, Function(excludeSuggestions As IEditableBySuggestion) excludeSuggestions.SuggestionType = SuggestionOperation.None)

...Where SuggestionOperation is an Enum (same as SuggestionType in IEditableBySuggestion)

I get the following exception:

[NotImplementedException: Unhandled NodeType of ConvertChecked in LambdaToDbExpressionVisitor.VisitUnary]

If I change my code to use an Integer instead of an Enum in the interface and filter it works fine. Are Enums currently supported in filters?
(Using v.3.0.0 and System.Data.SqlClient)

Hello @VidVid ,

Enum are supported but VB.NET have some difference over C#. So this scenario was working on C# but not on VB.NET

The v3.0.1 has been released.

Let me know if your scenario is now working on this new version.

Best Regards,

Jonathan

Thanks for your quick response, 3.0.1 took care of it!