Object copy approaches in .net: Auto Mapper, Emit Mapper, Implicit Operation, Property Copy

后端 未结 3 1392
无人及你
无人及你 2020-12-16 00:02

If some one knows any more ways of doing this in .NET and also what is your opinions about that approaches? Which approach you choose and why?

Here is the tests of d

3条回答
  •  渐次进展
    2020-12-16 00:46

    It is also possible to use T4 to generate classes that will generate property copy code.

    Good: runs as fast as it is possible Bad: "coding" in T4 Ugly: Making build scripts that allow you to compile it all in one go

提交回复
热议问题