static async Task InvokeSeederAsync <TContext>(IDbContextSeed <TContext>?seeder, TContext?context) where TContext : DbContext
 {
     if (context?.Database != null)
     {
         await context.Database.MigrateAsync();
     }
     if (seeder != default)
     {
         await seeder.SeedAsync();
     }
 }
 public ApplicationDbContextOptions(DbContextOptions <ApplicationDbContext> options, IDbContextSeed dbContextSeed, IEnumerable <IEntityTypeMap> mappings)
 {
     DbContextSeed = dbContextSeed;
     Options       = options;
     Mappings      = mappings;
 }
 public SofaIdentityDbContextOptions(DbContextOptions <SofaIdentityDbContext> options, IDbContextSeed dbContextSeed, IEnumerable <IEntityTypeMap> mappings)
 {
     DbContextSeed = dbContextSeed;
     Options       = options;
     Mappings      = mappings;
 }
 public static MigrateBuilder AddDbSeed <TDbContext>(this MigrateBuilder builder, IDbContextSeed <TDbContext> dbContextSeed) where TDbContext : Microsoft.EntityFrameworkCore.DbContext
 {
     builder.Services.AddSingleton(dbContextSeed);
     return(builder);
 }