Exemple #1
0
        public static void SeedHostDb(Project1DbContext 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();
        }
Exemple #2
0
 public DefaultTenantBuilder(Project1DbContext context)
 {
     _context = context;
 }
Exemple #3
0
 public DefaultLanguagesCreator(Project1DbContext context)
 {
     _context = context;
 }
 public DefaultSettingsCreator(Project1DbContext context)
 {
     _context = context;
 }
 /// <summary>
 /// A constructor that will accept dbContext as an object copy to instantiate connection
 /// </summary>
 /// <param name="dbContext"> a dbContext used to instantiate</param>
 public StoreRepository(Project1DbContext dbContext)
 => _dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
Exemple #6
0
 public InitialHostDbBuilder(Project1DbContext context)
 {
     _context = context;
 }
 public HostRoleAndUserCreator(Project1DbContext context)
 {
     _context = context;
 }
Exemple #8
0
 public TenantRoleAndUserBuilder(Project1DbContext context, int tenantId)
 {
     _context  = context;
     _tenantId = tenantId;
 }
Exemple #9
0
 public DefaultEditionCreator(Project1DbContext context)
 {
     _context = context;
 }