-
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
Support value conversions from two properties into one column #20582
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a several classes that contain property pairs like the following
I would like EF to ignore
MyValue
and storenull
in its place ifMyValueSpecified
is false. Otherwise,MyValue
should be mapped to the database as normal. The column behind this pairing should be nullable, but otherwise match the type ofMyValue
. To do this, I propose a new method on the model builder that allows multiple properties mapped to the same column. For example:I realize that this looks a lot like nullable value types, and I would rather use
int?
in my entities, but these classes are auto-generated by WCF and are outside of my control.Implementing this feature probably depends on #13850.
The text was updated successfully, but these errors were encountered: