我正在尝试为我的aspnet样板核心项目配置automapper.Collections,如何获取要配置的DBContext:
cfg.SetGeneratePropertyMaps>();
即在
public override void Initialize()
{
var thisAssembly = typeof(ApplicationModule).GetAssembly();
IocManager.RegisterAssemblyByConvention(thisAssembly);
Configuration.Modules.AbpAutoMapper().Configurators.Add(
// Scan the assembly for classes which inherit from AutoMapper.Profile
cfg => {
cfg.AddProfiles(thisAssembly);
cfg.AddCollectionMappers();
cfg.SetGeneratePropertyMaps<GenerateEntityFrameworkCorePrimaryKeyPropertyMaps<dbcontext>> ();
}
);
}