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
{{ message }}
Repository navigation
Missing disclaimer about incompatibility of generated values with ValueConversion #2252
For past few hours, I have been trying to use strongly typed ids (e.g. struct CustomerId with int inside instead of a simple int) in a model and so far it looks to be impossible (for Sql Server at least).
HiLo, Identity, just ignore it and use .ValueGeneratedOnAdd.. I always hit brick wall of runtime exception.
Examples:
'Identity value generation cannot be used for the property 'Id' on entity type 'Blog' because the property type is 'Id'. Identity value generation can only be used with signed integer properties.'
System.NotSupportedException: 'Value generation is not supported for property 'Blog.Id' because it has a 'ValueConverter<Id, int>' converter configured. Configure the property to not use value generation using 'ValueGenerated.Never' or 'DatabaseGeneratedOption.None' and specify explicit values instead.'
This should be documented on the page.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
ID: 97d622b2-1e4b-4d76-b3df-fefaa5ba99cb
Version Independent ID: ec833af2-275e-981f-689f-8c65edfc00cd
Activity
Updates to value converter docs
Updates to value converter docs
Updates to value converter docs
Updates to value converter docs (#3020)