public AppDbContext CreateDbContext(string[] args)
        {
            var builder       = new DbContextOptionsBuilder <AppDbContext>();
            var configuration = AppConfigurations.Get(typeof(AppDbContextFactory).Assembly, null, true);

            AppDbContextConfigurer.Configure(builder, configuration.GetConnectionString(Web.AppConsts.ConnectionStringName));

            return(new AppDbContext(builder.Options));
        }
Exemple #2
0
        public AppDbContext CreateDbContext(string[] args)
        {
            var builder       = new DbContextOptionsBuilder <AppDbContext>();
            var configuration = AppConfigurations.Get(WebContentDirectoryFinder.CalculateContentRootFolder());

            AppDbContextConfigurer.Configure(builder, configuration.GetConnectionString(Web.AppConsts.ConnectionStringName));

            return(new AppDbContext(builder.Options));
        }
        public AppDbContext CreateDbContext(string[] args)
        {
            var builder       = new DbContextOptionsBuilder <AppDbContext>();
            var configuration = AppConfigurations.Get(typeof(WebMvcModule).GetAssembly());

            AppDbContextConfigurer.Configure(builder, configuration.GetConnectionString(Web.AppConsts.ConnectionStringName));

            return(new AppDbContext(builder.Options));
        }