internal DesignTimeDbContextFactory( DbContextSettings dbContextSettings, IDbContextOptionsConfigurator dbContextOptionsConfigurator) { _dbContextSettings = dbContextSettings; _dbContextOptionsConfigurator = dbContextOptionsConfigurator; }
internal DbContextProvider( Type dbContextType, DbContextSettings dbContextSettings, IDbContextOptionsConfigurator dbContextOptionsConfigurator) { if (dbContextType == null) { throw new ArgumentNullException(nameof(dbContextType)); } if (!dbContextType.IsSubclassOf(typeof(EfDbContext))) { throw new ArgumentException($"Should be inherited from {nameof(EfDbContext)}.", nameof(dbContextType)); } _dbContextType = dbContextType; _dbContextSettings = dbContextSettings ?? throw new ArgumentNullException(nameof(dbContextSettings)); _dbContextOptionsConfigurator = dbContextOptionsConfigurator ?? throw new ArgumentNullException(nameof(dbContextOptionsConfigurator)); }