-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Generic Existing Object Mapping #1409
Comments
How would you implement this method manually? |
For non-generic, It uses the existing object for mapping without creating new one. Following that I can think of using the same instance of
I am thinking by above approach. Please note that I am learning about source generator, and I may have unexplored areas in this section. |
My question is not really related to source generators. Instead I‘m interested in how you would implement this method manually, without any source generator support. but I think i understood you wrong, you are not referring to queryable projection mappings correct? |
Yes @latonz, I was not referring to queryable projection. Generic existing object mapping for class or records only. Without source generator, I will create a method that takes a existing destination object reference and second one DTO or other object, map them and return the same destination object reference. |
This was exactly what i was searching for... i reach this page from the RMG001 error and with this post i understand it it not possible to do what i was trying to do.
with generated code..
|
Is your feature request related to a problem? Please describe.
I am trying to map existing object from DTO to Model in Entity Framework Core. It works for normal case by declaring void method as described in Existing Object Mapping.
In below code snippet it gives me error of -
RMG001
A mapping method has an unsupported signature.Describe the solution you'd like
API for updating directly working on existing object with Generic Mapping described in https://mapperly.riok.app/docs/configuration/generic-mapping/.
Describe alternatives you've considered
I have tried with mentioning return type. But it gives error of method must have an implementation.
The text was updated successfully, but these errors were encountered: