// <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;
}
时间: 2024-10-12 17:00:20