We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When a NOT NULL bit column has a constraint for default value set to TRUE (1), the C# model is generated as a nullable bool.
ALTER TABLE SomeTableName ADD CONSTRAINT DF_SomeTableName_SomeColumnName DEFAULT 1 FOR SomeColumnName
Produces: public bool? SomeColumnName{ get; set; }
Expected: public bool SomeColumnName{ get; set; }
If you set the default constraint to FALSE (0) it will produce the expected C# code.
EF Core Power Tools version: 2.5.454.0
Database engine: SQL Server
Visual Studio version: Visual Studio 2019, version 16.8.4
The text was updated successfully, but these errors were encountered:
Duplicate of #160 which was recently "fixed" with a new advanced option?
Sorry, something went wrong.
No branches or pull requests
When a NOT NULL bit column has a constraint for default value set to TRUE (1), the C# model is generated as a nullable bool.
ALTER TABLE SomeTableName ADD CONSTRAINT DF_SomeTableName_SomeColumnName DEFAULT 1 FOR SomeColumnName
Produces:
public bool? SomeColumnName{ get; set; }
Expected:
public bool SomeColumnName{ get; set; }
If you set the default constraint to FALSE (0) it will produce the expected C# code.
Steps to reproduce
Further technical details
EF Core Power Tools version: 2.5.454.0
Database engine: SQL Server
Visual Studio version: Visual Studio 2019, version 16.8.4
The text was updated successfully, but these errors were encountered: