UPDATE:
, Mapper.Map<VendorContact>(vendorContact); to existingStratusVendorContact Map(), , .
Mapper.Map(source) , .
Id, CreatedById CreatedOn .
Mapper.Map(source, destination), , :
Mapper.Map<VendorContact>(vendorContact, existingStratusVendorContact);
ORIGINAL:
:
var cfg = new MapperConfiguration(c =>
{
c.CreateMap<VendorContact, VendorContact>()
.ForMember(dest => dest.Id, option => option.Ignore())
.ForMember(dest => dest.CreatedById, option => option.Ignore())
.ForMember(dest => dest.CreatedOn, option => option.Ignore());
});
:
var mapper = cfg.CreateMapper();
:
var existingStratusVendorContact = mapper.Map<VendorContact>(vendorContact);
Mapper, .