Esempio n. 1
0
 public static string GetString(this DatabaseQuery query, string field)
 {
     return(query[field] == DBNull.Value ? string.Empty : (string)query[field]);
 }
Esempio n. 2
0
 public static DateTime GetDateTime(this DatabaseQuery query, string field)
 {
     return(query[field] == DBNull.Value ? DateTime.MinValue : (DateTime)query[field]);
 }
Esempio n. 3
0
 public static long GetLong(this DatabaseQuery query, string field)
 {
     return(query[field] == DBNull.Value ? 0 : (long)query[field]);
 }
Esempio n. 4
0
 public static int GetInt(this DatabaseQuery query, string field)
 {
     return(query[field] == DBNull.Value ? 0 : (int)query[field]);
 }
Esempio n. 5
0
 public static short GetShort(this DatabaseQuery query, string field)
 {
     return(query[field] == DBNull.Value ? (short)0 : (short)query[field]);
 }
Esempio n. 6
0
 public static byte GetByte(this DatabaseQuery query, string field)
 {
     return(query[field] == DBNull.Value ? (byte)0 : (byte)query[field]);
 }
Esempio n. 7
0
 public static bool GetBool(this DatabaseQuery query, string field)
 {
     return(Extensions.GetByte(query, field) == 1 ? true : false);
 }