abp vnext 使用之 EF 配置

通常,如果要启用ef 的logs 中加上SQL的参数值,需要在 AddDbContext 中使用 options.EnableSensitiveDataLogging(true) 。 但是在ABP中,已经不需要显示调用AddDbContext了,这个配置要在这个位置添加。

Configure<AbpDbContextOptions>(options =>
{
	options.UseSqlServer(); 
	// there 
	options.PreConfigure(context =>
	{
		context.DbContextOptions.EnableSensitiveDataLogging();
		context.DbContextOptions.EnableDetailedErrors();
	});
});

已禁用评论。