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
The reason I ask is that I am using reflection to query the entity model and need to get the default value, but it is not represented in the metadata as it is only included inside the constructor.
The text was updated successfully, but these errors were encountered:
If it is a simple integer, or getdate(), or something that is recognised as not being a complicated string, it's doable. But I fear it will not be a 100% foolproof solution.
When a column has a default value, this is implemented by setting that value in the constructor of the entity.
Is it possible to also generate the .HasDefaultValue() in the entity configuration class as per https://learn.microsoft.com/en-us/ef/core/modeling/generated-properties?tabs=data-annotations ?
Would this introduce any side effects?
The reason I ask is that I am using reflection to query the entity model and need to get the default value, but it is not represented in the metadata as it is only included inside the constructor.
The text was updated successfully, but these errors were encountered: