Esempio n. 1
0
        public static bool IsMappingType(Type type, out MappingTypeInfo mappingTypeInfo)
        {
            Type underlyingType = type.GetUnderlyingType();

            if (underlyingType.IsEnum)
            {
                underlyingType = Enum.GetUnderlyingType(underlyingType);
            }

            return(_typeInfos.TryGetValue(underlyingType, out mappingTypeInfo));
        }
Esempio n. 2
0
 static void SetItem(Dictionary <Type, MappingTypeInfo> map, Type type, DbType mapDbType, IMappingType mappingType = null)
 {
     map[type] = new MappingTypeInfo(type, mapDbType, mappingType);
 }
Esempio n. 3
0
 static void SetItem(Dictionary <Type, MappingTypeInfo> map, Type type, DbType mapDbType, IDbValueConverter dbValueConverter = null)
 {
     map[type] = new MappingTypeInfo(type, mapDbType, dbValueConverter);
 }