using AutoMapper.Configuration;
public static void Main()
var config = new MapperConfiguration(cfg =>
cfg.CreateMap<TheDto, TheModel>()
.ForMember(dest => dest.Id, opt => opt.NullSubstitute(Guid.Empty))
.AfterMap((dto, model) => model.Internal ??= "NotNull");
var mapper = config.CreateMapper();
var dto = new TheDto{Id = null, Type = Guid.NewGuid(), Title = null, Description = "any desc", };
var model = mapper.Map<TheModel>(dto);
public string Description
public string? ItIsAnything
public string? AnotherInternal
public string Description
public string? ItIsAnything