-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
preview7 regression: Nullable`1 types treated as required #16894
Comments
Temporary workaround: ModelBuilder.Entity<Model>(e =>
{
e.Property(m => m.DeletedAt).IsRequired(false);
// ...
}); |
This may have the same underlying cause as #16760, but it pertains to nullable value types instead of NRTs, so I'm not positive. I haven't tested with nightly yet. |
@Zenexer Please post a small, runnable project/solution or complete code listing that demonstrates the behavior you are seeing. |
@ajcvickers Before I devote considerable time to making a minimal project, do you happen to know whether this was likely fixed along with #16760? |
@Zenexer From the minimal information above, I would guess yes, but it's a very low confidence guess. |
EF Team Triage: Closing this issue as the requested additional details have not been provided and we have been unable to reproduce it. BTW this is a canned response and may have info or details that do not directly apply to this particular issue. While we'd like to spend the time to uniquely address every incoming issue, we get a lot traffic on the EF projects and that is not practical. To ensure we maximize the time we have to work on fixing bugs, implementing new features, etc. we use canned responses for common triage decisions. |
I have a model with a
Nullable<DateTime>
that looks something like this:DateTime
is a value type, soDateTime?
is aNullable<DateTime>
, not a NRT.DeletedAt
is logically initialized tonull
and isn't required. However,HasData
results in the following exception:The text was updated successfully, but these errors were encountered: