コード例 #1
0
 public IDataReader ExecuteReader(string query)
 {
     using (IDbCommand cmd = CreateCommand())
     {
         cmd.CommandText = query;
         return(SqlEngine.ExecuteReader(cmd));
     }
 }
コード例 #2
0
 public T ExecuteScalar <T>(string query)
 {
     using (IDbCommand cmd = CreateCommand())
     {
         cmd.CommandText = query;
         return(SqlEngine.ExecuteScalar <T>(cmd));
     }
 }
コード例 #3
0
 public int ExecuteNonQuery(string query)
 {
     using (IDbCommand cmd = CreateCommand())
     {
         cmd.CommandText = query;
         return(SqlEngine.ExecuteNonQuery(cmd));
     }
 }
コード例 #4
0
 public T ExecuteScalar <T>(string query, string[] values)
 {
     using (IDbCommand cmd = CreateCommand())
     {
         cmd.CommandText = ((values != null) && (values.Length != 0)) ? string.Format(query, (object[])values)
                                                              : query;
         return(SqlEngine.ExecuteScalar <T>(cmd));
     }
 }