i'm having an error during automapper in win app in c# this row:
config.CreateMap<T432, PROC>()
.ForMember(d => d.TIPO.COD_TIPO , o => o.MapFrom(s => s.COD_TIPO))
the error is : Expression 'd => d.TIPO.COD_TIPO' must resolve to top-level member and not any child object's properties. Use a custom resolver on the child type or the AfterMap option instead.\r\nNome parametro: lambdaExpression"}
where
class T432
{
public string COD_TIPO { get; set; }
}
class PROC
{
public TIPO_PROC TIPO { get; set; }
}
class TIPO_PROC
{
public string COD_TIPO { get; set; }
}
how is correct automapper?
thanks in advance