public LocalCoreDbContext CreateDbContext(string[] args) { var builder = new DbContextOptionsBuilder <LocalCoreDbContext>(); //var configuration = AppConfigurations.Get(WebContentDirectoryFinder.CalculateContentRootFolder()); MyDocumentManageDbContextConfigurer.Configure(builder, AppConfigurtaionServices.GetAppSettings()["ConnectionStrings:mydb"]); return(new LocalCoreDbContext()); }
public DbContextOptions <LocalCoreDbContext> GetDbContextOption() { var builder = new DbContextOptionsBuilder <LocalCoreDbContext>(); //var configuration = AppConfigurations.Get(WebContentDirectoryFinder.CalculateContentRootFolder()); //MyDocumentManageDbContextConfigurer.Configure(builder, configuration.GetConnectionString("mydb")); MyDocumentManageDbContextConfigurer.Configure(builder, AppConfigurtaionServices.GetAppSettings()["ConnectionStrings:mydb"]); return(builder.Options); }