public TDb NewDb(EFConfig config) { var db = new TDb(); db.Configuration.AutoDetectChangesEnabled = config.AutoDetectChangesEnabled; db.Configuration.LazyLoadingEnabled = config.LazyLoadingEnabled; db.Configuration.ProxyCreationEnabled = config.ProxyCreationEnabled; db.Configuration.ValidateOnSaveEnabled = config.ValidateOnSaveEnabled; return(db); }
/// <summary> /// /// </summary> /// <param name="config">The default configuration to initialize new Dbs with</param> public DbFactory(EFConfig config) { this.defaultConfig = config; }