public static void SeedHostDb(AbpDemoDbContext context) { context.SuppressAutoSetTenantId = true; // Host seed new InitialHostDbBuilder(context).Create(); // Default tenant seed (in host database). new DefaultTenantBuilder(context).Create(); new TenantRoleAndUserBuilder(context, 1).Create(); }
private static SqliteConnection CreateDatabaseAndGetConnection() { var connection = new SqliteConnection("Data Source=:memory:"); connection.Open(); var options = new DbContextOptionsBuilder <AbpDemoDbContext>() .UseSqlite(connection) .Options; using (var context = new AbpDemoDbContext(options)) { context.GetService <IRelationalDatabaseCreator>().CreateTables(); } return(connection); }
public TestDataBuilder(AbpDemoDbContext context) { _context = context; }
public DefaultTestDataForTask(AbpDemoDbContext context) { _context = context; }
public DefaultTenantCreator(AbpDemoDbContext context) { _context = context; }
public DefaultLanguagesCreator(AbpDemoDbContext context) { _context = context; }
public TenantRoleAndUserBuilder(AbpDemoDbContext context, int tenantId) { _context = context; _tenantId = tenantId; }
public InitialHostDbBuilder(AbpDemoDbContext context) { _context = context; }
public DefaultTenantBuilder(AbpDemoDbContext context) { _context = context; }
public HostRoleAndUserCreator(AbpDemoDbContext context) { _context = context; }
public DefaultEditionsCreator(AbpDemoDbContext context) { _context = context; }
public DefaultSettingsCreator(AbpDemoDbContext context) { _context = context; }