Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="config">The default configuration to initialize new Dbs with</param>
 public DbFactory(EFConfig config)
 {
     this.defaultConfig = config;
 }