📅  最后修改于: 2022-03-11 14:49:10.981000             🧑  作者: Mango
var config = new MapperConfiguration(cfg => { cfg.CreateMap(); });IMapper iMapper = config.CreateMapper();var source = new AuthorModel();source.Id = 1;source.FirstName = "Joydip";source.LastName = "Kanjilal";source.Address = "India";var destination = iMapper.Map(source);Console.WriteLine("Author Name: "+ destination.FirstName + " " + destination.LastName);