You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following error when I try to use "in" with an array of Enum strings:
The value passed in must be an enum base or an underlying type for an enum, such as an Int32. (Parameter 'value')
at System.Enum.ToObject(Type enumType, Object value)
at Breeze.Core.BinaryPredicate.Validate(Type entityType)
at Breeze.Core.AndOrPredicate.<>c__DisplayClass5_0.<Validate>b__0(BasePredicate p)
at System.Collections.Generic.List`1.ForEach(Action`1 action)
at Breeze.Core.AndOrPredicate.Validate(Type entityType)
at Breeze.Core.EntityQuery.Validate(Type entityType)
at Breeze.AspNetCore.BreezeQueryFilterAttribute.OnActionExecuted(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
Ran into this while porting a codebase from .NET Framework 4.8/EF6/ASP.NET to .NET 8.0/EF Core/ASP.NET Core.
The old codebase uses string Enums, and we don't want to particularly move away from them at this point (it would cause a tonne of changes in our frontend code which we want to avoid).
I have set BreezeConfig.Instance.UseIntEnums = false; and called UpdateWithDefaults with false for useIntEnums.
The text was updated successfully, but these errors were encountered:
I get the following error when I try to use "in" with an array of Enum strings:
Query:
Entities:
Ran into this while porting a codebase from .NET Framework 4.8/EF6/ASP.NET to .NET 8.0/EF Core/ASP.NET Core.
The old codebase uses string Enums, and we don't want to particularly move away from them at this point (it would cause a tonne of changes in our frontend code which we want to avoid).
I have set
BreezeConfig.Instance.UseIntEnums = false;
and calledUpdateWithDefaults
withfalse
foruseIntEnums
.The text was updated successfully, but these errors were encountered: