-
Notifications
You must be signed in to change notification settings - Fork 114
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
TinyMapper mapping with list of entity object #32
Comments
I'm not sure that understand what are you going to bind. Do you want to map Anyway, if you are going to map |
Exactly, what you understand is right!!
Can you please provide me the steps to map these two list?
Can you please suggest Mapping code? |
yes, sure. Call this lines some where in the application start
then in you logic
here the working sample
|
Many thanks for the example!! 👍 Now am able to do collection mapping successfully. Thanks for raising helping hands!! |
There are spots even in the sun :) As for me, there are following pros and cons: TinyMapper Pros:
Cons:
AutoMapper Pros:
Cons:
I added "Huge amount of mappings" to pros and cons in So, it depends on the exact issue, maybe even using several mappers could be a good decision. |
@GSerjo Thanks for the detailed information!! |
@GSerjo I am getting below exception when I try to map below two objects:
Please help me out. |
The exception occurred because
About
Each application has bugs, more important how quickly it could be fixed. About Anyway, doesn't matter what kind of mapper you choose, try to minimize usage it across all application, i.e. if there're too many |
I have started using TinyMapper in my project for object-to-object mapping and got succeeded for single object to single object mapping but i stuck when i want to map the whole list of entity object to list of DTO class. Can you please help me out. I googled but didn't find any solution. Can anyone please help me out?
I am able to map single object to object by using below code:
But i stuck when i want to map whole list of survey entity to surveyDto entity:
gives below error:
Cannot implicitly convert type
System.Collections.Generic.List<SurveyDto>' to 'SurveyDto'
The text was updated successfully, but these errors were encountered: