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