Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mapping Objects

what is the best Solution for mapping class object to lightweight class object by example:

Customer to CustomerDTO both have the same properties names, i was thinking of the best optimized solution for mapping between them , i know reflection slow me down badly , and making methods for every mapping is time consuming so any idea ?

thanks in advance.

like image 705
Stacker Avatar asked Dec 29 '22 09:12

Stacker


1 Answers

AutoMapper. There's also ValueInjecter and Emit Mapper.

like image 82
Darin Dimitrov Avatar answered Jan 03 '23 17:01

Darin Dimitrov