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 Name { 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<Person, PersonVM>();
IMapper mapper = config.CreateMapper();
var person = new Person { FirstName=null , LastName = "Dev", Age=10, Email = "test@test.com", Address="Test Address" };
var personVM = mapper.Map<PersonVM>(null);
Console.WriteLine("\nWithout null value");
personVM = mapper.Map<PersonVM>(null);
Console.WriteLine("\n WITH null value");