Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EF6 does not support enums #139

Open
alex-fomin opened this issue Oct 22, 2019 · 0 comments
Open

EF6 does not support enums #139

alex-fomin opened this issue Oct 22, 2019 · 0 comments

Comments

@alex-fomin
Copy link

I have a enum defined in PostgtreSQL as
CREATE TYPE NOTIFICATION_CHANNEL AS ENUM ('email', 'sms');
When I try to create query against this enum (smth. like dbContext.Notifications.Where(x=>x.Channel == NotificationChannel.Email))) i get cannot cast type notification_channel to integer

I have registered my enum as
NpgsqlConnection.GlobalTypeMapper.MapEnum<NotificationChannel>();
in my DbContext static constructor.

Does EF6 NpgSql support PGSQL enums?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant