public int? GetValueInt(string key) { var value = GetValue(key); return value == DBNull.Value ? (int?) null : Convert.ToInt32(value); }