-
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
ValueConverter for entity. #32222
Comments
@xvxzvxzvxvzxcusernamegithubav Can you show what code you want to write and what should happen in the database when it executes? |
I just want to get all entities from the database. But based on the type I want to add one day to the date. (Basically to align different types of entities from some legacy systems). This would work with a converter if it was for all entities:
And of course I can run this after or while querying the data but I would like to be completely ignorant of it in my code. I would like to have a single point of definition for this offset. |
@xvxzvxzvxvzxcusernamegithubav This isn't currently supported by value converters, but is tracked by #12205. Please vote (👍) for that issue. |
Duplicate of #12205 |
Ok, i hope this scenario is covered by the duplicate. |
Given an table:
I need to change the MyDateTime on reading and writing based on MyType I would try a ValueConverter<DateTime,DateTime> but this value converter has no acces to the MyType.
How can I do this?
I did try to find some previous questions but for me it's not really clear whether this is possible or not.
The text was updated successfully, but these errors were encountered: