Beispiel #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));
        }
Beispiel #2
0
 static void SetItem(Dictionary <Type, MappingTypeInfo> map, Type type, DbType mapDbType, IMappingType mappingType = null)
 {
     map[type] = new MappingTypeInfo(type, mapDbType, mappingType);
 }
Beispiel #3
0
 static void SetItem(Dictionary <Type, MappingTypeInfo> map, Type type, DbType mapDbType, IDbValueConverter dbValueConverter = null)
 {
     map[type] = new MappingTypeInfo(type, mapDbType, dbValueConverter);
 }