Example #1
0
 public DbInitializer(ApplicationDbContext context, UserManager <ApplicationUser> userManager,
                      RoleManager <IdentityRole> roleManager, IAppPermissionsLookup permissions, IGymRepository gymsRepo)
 {
     this._context     = context;
     this._userManager = userManager;
     this._roleManager = roleManager;
     this._permissions = permissions;
     this._gymsRepo    = gymsRepo;
 }
Example #2
0
        public Startup(IHostingEnvironment env)
        {
            var builder = new ConfigurationBuilder()
                          .SetBasePath(env.ContentRootPath)
                          .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
                          .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
                          .AddEnvironmentVariables();

            Configuration = builder.Build();
            _permissions  = new AppPermissionsLookup();
        }
Example #3
0
 public TestStartup(IHostingEnvironment env) : base(env)
 {
     _permissions = new AppPermissionsLookup();
 }