protected virtual void ConfigureEntity(ITableConfig table) { var initializer = new EntityInitializer(table); var factory = new EntityFactory(table, initializer); var entity = factory.Create() as IEntityConfiguration; if (entity == null) { return; } entity.Configure(this, table); }
protected virtual IEntityFactory GetFactory(ITableConfig table) { var factory = default(IEntityFactory); if (!this.Factories.TryGetValue(table, out factory)) { var initializer = new EntityInitializer(table); var populator = new EntityPopulator(this.Database, table); factory = new EntityFactory(table, initializer, populator); this.Factories.Add(table, factory); } return(factory); }