示例#1
0
        private MapRepository()
        {
            Tables = new Dictionary<Type, string>();
            Columns = new Dictionary<Type, ColumnMapCollection>();
            Relationships = new Dictionary<Type, RelationshipCollection>();
            TypeConverters = new Dictionary<Type, IConverter>();

            // Register a default IReflectionStrategy
            ReflectionStrategy = new CachedDelegateReflectionStrategy();

            // Register a default type converter for Enums
            TypeConverters.Add(typeof(Enum), new Converters.EnumStringConverter());

            // Register a default IDbTypeBuilder
            _dbTypeBuilder = new Parameters.DbTypeBuilder();

            _columnMapStrategies = new Dictionary<Type, IMapStrategy>();
            RegisterDefaultMapStrategy(new AttributeMapStrategy());

            EnableTraceLogging = false;
        }
示例#2
0
        private MapRepository()
        {
            Tables         = new Dictionary <Type, string>();
            Columns        = new Dictionary <Type, ColumnMapCollection>();
            Relationships  = new Dictionary <Type, RelationshipCollection>();
            TypeConverters = new Dictionary <Type, IConverter>();

            // Register a default IReflectionStrategy
            ReflectionStrategy = new SimpleReflectionStrategy();

            // Register a default type converter for Enums
            TypeConverters.Add(typeof(Enum), new EnumStringConverter());

            // Register a default IDbTypeBuilder
            _dbTypeBuilder = new DbTypeBuilder();

            _columnMapStrategies = new Dictionary <Type, IMapStrategy>();
            RegisterDefaultMapStrategy(new AttributeMapStrategy());

            EnableTraceLogging = false;
        }