Пример #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));
 }
Пример #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));
 }
Пример #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));
 }
Пример #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));
 }
Пример #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));
 }