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
No value generator is available for properties of type 'Decimal' #2087
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
Comments
Update: this issue is still present in 7.0.0-beta4
|
ajcvickers
added a commit
that referenced
this issue
May 1, 2015
This allows some form of temporary value generation to happen for any kind of strange key types. Fixes Issue #2087.
ajcvickers
added a commit
that referenced
this issue
May 4, 2015
This allows some form of temporary value generation to happen for any kind of strange key types. Fixes Issue #2087.
This should be fixed now. |
ajcvickers
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Oct 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
I am working with an existing legacy database table that contains a primary key defined as "numeric(18, 0)". In Entity Framework 7.0.0-beta3, this is mapping to a CLR type of Decimal. The Microsoft.Data.Entity.SqlServer.SqlServerValueGeneratorSelector (and its base class Microsoft.Data.Entity.Identity.ValueGeneratorSelector) do not have a comparison for decimal types defined.
Per the error message (see below), I have two options: 1) set a value for the property before adding the entity or 2) configure a value generator for properties of type 'Decimal'. The database is not configured to allow for inserts that include the primary key, so I believe I'm left with the second option.
How do I configure a value generator for properties of type 'Decimal'?
When I try to modify items in an existing DBSet, I get this error message:
My model:
My model context:
My data service:
The text was updated successfully, but these errors were encountered: