public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get; set; }
public string Address { get; set; }
public string Email { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get; set; }
public string Address { get; set; }
public string Email { get; set; }
public static void Main()
var config = new MapperConfiguration(cfg => {
cfg.CreateMap<PersonVM, Person>();
IMapper mapper = config.CreateMapper();
var personVM = new PersonVM { FirstName="Amal" , LastName = "Dev", Age=20, Address = "Trivandrum", Email="test@test.com" };
var person = new Person { FirstName="Amal" , LastName = "Dev", Age=10, Address = "Delhi", Email="test@test.com" };
mapper.Map(personVM,person);
Console.WriteLine("\nperson.FirstName : {0} \nperson.LastName : {1} \nperson.Age : {2} \nperson.Address : {3} \nperson.Email : {4} ",
person.FirstName, person.LastName, person.Age, person.Address, person.Email);