Esempio n. 1
0
 /// <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));
 }
Esempio n. 2
0
 /// <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));
 }
Esempio n. 3
0
 /// <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));
 }
Esempio n. 4
0
 /// <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));
 }
Esempio n. 5
0
 /// <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));
 }