Automapper неправильно отображает нулевое значение типа Nullable на значение по умолчанию типа NULL-NULL.
public class Product
{
public Guid? ExternalId { get; set; }
}
public class ProductEntity
{
public Guid? ExternalId { get; set; }
}
Если ProductEntity имеет значение NULL для ExternalId, сопоставление с продуктом приводит к Guid.Empty
Это предполагаемое поведение? У нас нет специального отображения.
public class ProductProfile : Profile
{
public ProductProfile()
{
CreateMap<ProductEntity, Product>();
CreateMap<Product, ProductEntity>();
}
}
Мы используем Automapper 7.0.1