我目前有以下映射:
Mapper.CreateMap<Journal, JournalDto>();
现在,Journal包含一个名为的成员RefTypeID,其对应的值存在于数据库的另一个表中; 为了查找这个值,我有一个处理简单int -> string请求的服务.automapper配置当前发生在程序开头的静态类中.可以将映射代码移动到一个注入我的DI容器的类中,还是有更好的方法?
Journal
RefTypeID
int -> string
dependency-injection automapper
automapper ×1
dependency-injection ×1