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 using the HasDefaultValue() method on fields that are non-nullable, EF does not behave as expected. When explicitly providing a different value for a non-nullable field, the provided value is overridden by the default value. Changing the field to be nullable does however work as expected.
Please make sure to include this in the documentation or possibly file a bug report.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
ID: 97d622b2-1e4b-4d76-b3df-fefaa5ba99cb
Version Independent ID: ec833af2-275e-981f-689f-8c65edfc00cd
@antonthomas Currently the default value is used whenever the property is set to the CLR default. Configuration of this is tracked by dotnet/efcore#701. Please vote for that issue if this is something you need.
When using the HasDefaultValue() method on fields that are non-nullable, EF does not behave as expected. When explicitly providing a different value for a non-nullable field, the provided value is overridden by the default value. Changing the field to be nullable does however work as expected.
Please make sure to include this in the documentation or possibly file a bug report.
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: