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
When moving from Core 2.2 to Core 3.1 and upgrading the lib Npgsql.EntityFramrworkCore.PostgreSQL from 2.2.0 to 3.1.4, I still have the issue reported and fixed by #489 but only in specific cases.
It seems that if the enum is a variable and is casted in the expression it fails, while if it "hard coded"or casted outside, it works.
It was working in 2.2
public IQueryable<Request> GetFilter(IQueryable<Request> query, Applications application)
{
var app = (int)application;
query.Where (r=>r.ApplicationId == app)
return query;
}
The text was updated successfully, but these errors were encountered:
killergege
changed the title
Where queries with casted enum value throw Can't write CLR type
Can't write CLR type with handler type Int32Handler
Jun 30, 2020
When moving from Core 2.2 to Core 3.1 and upgrading the lib Npgsql.EntityFramrworkCore.PostgreSQL from 2.2.0 to 3.1.4, I still have the issue reported and fixed by #489 but only in specific cases.
It seems that if the enum is a variable and is casted in the expression it fails, while if it "hard coded"or casted outside, it works.
It was working in 2.2
This works (hard coded enum):
This doesn't work (enum value in a variable) (throws InvalidCastException "Can't write CLR type Applications with handler typeInt32Handler"):
But this works:
The text was updated successfully, but these errors were encountered: