EF Core query a postgreSQL user-defined enum type

82 Views Asked by At

I have a column with a UDT in my table and when I try to query it with EF Core the database throws an error

operator does not exist: example_type = text

This doesn't work:

var type = ExampleType.ExampleValue;
    
query.Where(e => e.Type == type)...

But if I pass it directly it works

query.Where(e => e.Type == ExampleType.ExampleValue)...
0

There are 0 best solutions below