I have an entity class Person
and its corresponding DTO class PersonDto
.
public class Person: Entity
{
public virtual string Name { g
You can have a look on the two most used Object-Object mapper:
AutoMapper
AutoMapper is a simple little library built to solve a deceptively complex problem - getting rid of code that mapped one object to another. This type of code is rather dreary and boring to write, so why not invent a tool to do it for us?
Value Injecter
ValueInjecter lets you define your own convention-based matching algorithms (ValueInjections) in order to match up (inject) source values to destination values.
There is a comparison article on SO: AutoMapper vs ValueInjecter