📜  c# map - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:07.728000             🧑  作者: Mango

代码示例4
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);