// <summary>
/// 如果数据为null,则转成数据库可识别的DBNULL.Value
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public static object DBValue(this object obj)
{
if (obj == null)
return DBNull.Value;
return obj;
}
// <summary>
/// 如果数据为null,则转成数据库可识别的DBNULL.Value
/// </summary>
/// <param name="obj"></param>
/// <returns></returns>
public static object DBValue(this object obj)
{
if (obj == null)
return DBNull.Value;
return obj;
}