public ActionResult SimpleMapping() { var person = new Person() { FirstName = "Sunil", LastName = "Munikar" }; var personVm = new PersonViewModel(); Mapper.Map(person, personVm); return View(personVm); }
public ActionResult CustomMapping() { var person = new Person() { FirstName = "Sunil", LastName = "Munikar" }; var customerVm = new CustomerViewModel(); Mapper.Map(person, customerVm); return View(customerVm); }