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

Reverse Engineering MS SQL DB - Bit to bool #2079

Closed
Paul-VSA opened this issue Jan 10, 2024 · 3 comments
Closed

Reverse Engineering MS SQL DB - Bit to bool #2079

Paul-VSA opened this issue Jan 10, 2024 · 3 comments
Labels
question Further information is requested

Comments

@Paul-VSA
Copy link

When reverse engineering a table with a non-nullable bit field, such as "IsEnabled", the model generated contains a nullable Boolean field. This obviously does not align well when trying to map the entity model to a DTO, requiring an explicit conversion from bool? to bool.

@ErikEJ
Copy link
Owner

ErikEJ commented Jan 10, 2024

Which EF Core version - if 6 or 7, use the advanced option to remove the bad default value and make it non-nullable

see https://github.com/ErikEJ/EFCorePowerTools/wiki/Reverse-Engineering#code-generation

duplicate of #160

@ErikEJ ErikEJ closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2024
@ErikEJ ErikEJ added the question Further information is requested label Jan 10, 2024
@Paul-VSA
Copy link
Author

Paul-VSA commented Jan 10, 2024 via email

@ErikEJ
Copy link
Owner

ErikEJ commented Jan 10, 2024

Your email reply is already here!

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

No branches or pull requests

2 participants