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