HasDefaultValue type casting #6056
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
Steps to reproduce
Add a property to your entity that is a
short
, specify an integer as a default value:The issue
This worked in RC1, but in RTM:
It looks like in RTM, EF7 doesn't try to type cast, so it sees an int as an invalid value for a short.
Changing the code to this works:
I think it would be better if the type can be safely cast, then to handle that automatically.
Further technical details
EF Core version: (RTM)
Operating system: Windows 8
Visual Studio version: 2015
The text was updated successfully, but these errors were encountered: