예제 #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));
        }
예제 #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));
        }
예제 #3
0
 public object GetSetParameterValue(object parameterValue)
 {
     if (parameterValue == null)
     {
         return(DBNull.Value);
     }
     else
     {
         return(XmlSerializeUtil.Serializer(parameterValue));
     }
 }
예제 #4
0
 public void SetParameter(IDataParameter dataParameter, object parameterValue)
 {
     if (parameterValue == null)
     {
         dataParameter.Value = DBNull.Value;
     }
     else
     {
         var xmlStr = XmlSerializeUtil.Serializer(parameterValue);
         dataParameter.Value = xmlStr;
     }
 }
예제 #5
0
 public virtual object ToParameterValue(object value)
 {
     return(XmlSerializeUtil.Serializer(value));
 }
예제 #6
0
 protected override object GetSetParameterValueWhenNotNull(object parameterValue)
 {
     return(XmlSerializeUtil.Serializer(parameterValue));
 }