Beispiel #1
0
        public object GetValue(IDataReader dataReader, int columnIndex, Type targetType)
        {
            var xmlStr = dataReader.GetString(columnIndex);

            if (String.IsNullOrEmpty(xmlStr))
            {
                return(null);
            }
            return(XmlSerializeUtil.Deserialize(xmlStr, targetType));
        }
Beispiel #2
0
        public object GetValue(IDataReader dataReader, int columnIndex, Type targetType)
        {
            if (dataReader.IsDBNull(columnIndex))
            {
                return(null);
            }
            var xmlStr = dataReader.GetString(columnIndex);

            return(XmlSerializeUtil.Deserialize(xmlStr, targetType));
        }