Hi,
when I'm using this mapping
Mapper.CreateMap<DataSourceConfigurationContract, DataSourceConfigurationContract>().ForMember(x => (object)x.DatabaseTypeException, opt => opt.Ignore())
.ForMember(x => (object)x.DatabaseType, opt => opt.Ignore());
var mappedValue = Mapper.Map<DataSourceConfigurationContract, DataSourceConfigurationContract>(dataSourceConfiguration);
for this class
public sealed class DataSourceConfigurationContract {
public string Name { get; set; }
public string ConnectionString { get; set; }
public string ConnectionType { get; set; }
public DataSourcePropertyContractCollection Properties { get; set; }
public DataSourceAreaConfigurationContractCollection Areas { get; set; }
public UserContractCollection AllowedUsers{ get; set; }
public DataSourceType? DatabaseType { get; set; }
public ExceptionContract DatabaseTypeException { get; set; }
public DataSourceType DataSourceType { get; set; } }
some Properties are ignored (e.g. Areas) that should be mapped. The string properties seem to be always correctly mapped. What have I done wrong?