Configuring default value with fluent API doesn't support enum value without explicitly casting to int #4286
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
Suppose we have model class with property of enum type that should be mapped to INT column in database. The class looks as follows
Also we want to configure default value for that column with fluent API as follows:
Everything looks fine. Let's generate migration:
Here's what we get:
It turns out that the problem is default value type. The error is in default value configuration and the correct syntax is:
The exception message is absolutely not clear.
The text was updated successfully, but these errors were encountered: