Нет ничего специфичного для OpenIddict, чтобы справиться с этим, но этого легко достичь, используя обычные EF-хуки.Вот пример:
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext(DbContextOptions options)
: base(options) { }
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
// Customize the ASP.NET Identity model and override the defaults if needed.
// For example, you can rename the ASP.NET Identity table names and more.
// Add your customizations after calling base.OnModelCreating(builder);
foreach (var entity in builder.Model.GetEntityTypes())
{
for (var type = entity; type != null; type = type.BaseType)
{
if (type.ClrType.Assembly == typeof(OpenIddictApplication).Assembly)
{
entity.SqlServer().Schema = "security";
break;
}
}
}
}
}