Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# mapper.map

var config = new MapperConfiguration(cfg => {                cfg.CreateMap<AuthorModel, AuthorDTO>();            });IMapper iMapper = config.CreateMapper();var source = new AuthorModel();source.Id = 1;source.FirstName = "Joydip";source.LastName = "Kanjilal";source.Address = "India";var destination = iMapper.Map<AuthorModel, AuthorDTO>(source);Console.WriteLine("Author Name: "+ destination.FirstName + " " + destination.LastName);
Source by www.infoworld.com #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
2+7 =