Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 public TestDataBuilder(AbpDemoDbContext context)
 {
     _context = context;
 }
 public DefaultTestDataForTask(AbpDemoDbContext context)
 {
     _context = context;
 }
 public DefaultTenantCreator(AbpDemoDbContext context)
 {
     _context = context;
 }
Esempio n. 6
0
 public DefaultLanguagesCreator(AbpDemoDbContext context)
 {
     _context = context;
 }
 public TenantRoleAndUserBuilder(AbpDemoDbContext context, int tenantId)
 {
     _context  = context;
     _tenantId = tenantId;
 }
 public InitialHostDbBuilder(AbpDemoDbContext context)
 {
     _context = context;
 }
Esempio n. 9
0
 public DefaultTenantBuilder(AbpDemoDbContext context)
 {
     _context = context;
 }
Esempio n. 10
0
 public HostRoleAndUserCreator(AbpDemoDbContext context)
 {
     _context = context;
 }
Esempio n. 11
0
 public DefaultEditionsCreator(AbpDemoDbContext context)
 {
     _context = context;
 }
Esempio n. 12
0
 public DefaultSettingsCreator(AbpDemoDbContext context)
 {
     _context = context;
 }