public Database(string connectionString) { if (string.IsNullOrWhiteSpace(connectionString)) { throw new ArgumentNullException(nameof(connectionString)); } Context = new RegistryDbContext(connectionString); Context.Configuration.AutoDetectChangesEnabled = false; Context.Configuration.LazyLoadingEnabled = false; Context.Configuration.ProxyCreationEnabled = false; }
public Database() { Context = new RegistryDbContext(); Context.Configuration.AutoDetectChangesEnabled = false; }
public Database(RegistryDbContext context) { Context = context ?? throw new ArgumentNullException(nameof(context)); Context.ChangeTracker.AutoDetectChangesEnabled = false; }