Is there a plugin for generating code for a visual studio that will allow me to select 2 objects and map properties

I’m thinking of something that could allow me to select two objects of different types and describe the mappings between them (perhaps visually?), And then allow the creation of code for operations such as shallow and deep copy, and possibly show me inappropriate properties?

I know about runtime solutions like Automapper, but not about things that can help me with code generation. I need to keep up with some large, fast-growing classes and display them from and from them.

+3
source share
2 answers

I am not aware of any tool, but I wrote a macro that helps a lot.

. , .

x.Prop1 = 0;
x.Prop2 = "Prop2";
x.Prop3 = 0;

, " y ;"

x.Prop1 = y ;
x.Prop2 = y ;
x.Prop3 = y ;

, , y ;, , . intellisense.

.

+1

T4 (Text Template Transformation Toolkit) .

http://msdn.microsoft.com/en-us/library/bb126445.aspx

+2
source

All Articles