/// <summary> /// Returns null when value is null or an empty string. /// </summary> /// <param name="value"></param> /// <returns></returns> public static string E(string value) { return(NullIf.Empty(value)); }
/// <summary> /// Returns null when value is null or System.DBNull.Value. /// </summary> /// <param name="dbValue"></param> /// <returns></returns> public static object D(object dbValue) { return(NullIf.DBNull(dbValue)); }
/// <summary> /// Returns null when value is null, empty string or /// System.DBNull.Value. /// If the value is not null nelse System.DBNull.Value nelse string an exception /// of invalid cast is throwed. /// </summary> /// <param name="dbValue"></param> /// <returns></returns> public static string DE(object dbValue) { return(NullIf.DBNullOrEmpty(dbValue)); }
/// <summary> /// Returns null when value is null, empty string, white space string or /// System.DBNull.Value. /// If the value is not null nelse System.DBNull.Value nelse string an exception /// of invalid cast is throwed. /// </summary> /// <param name="dbValue"></param> /// <returns></returns> public static string DW(object dbValue) { return(NullIf.DBNullOrWhite(dbValue)); }
/// <summary> /// Returns null when value is null, empty string or white space string /// </summary> /// <param name="value"></param> /// <returns></returns> public static string W(string value) { return(NullIf.White(value)); }