Esempio n. 1
0
 public static SqlExpressCommand Create(string sqlStatement,Query query)
 {
     SqlExpressCommand command = new SqlExpressCommand();
     command.AppendStatement(sqlStatement);
     command.TranslateQuery(query);
     return command;
 }
Esempio n. 2
0
 protected override IDataReader ExecuteReader(SqlExpressCommand command)
 {
     if(command.DbParameters==null)
     {
         return SqlHelper.ExecuteReader(ConnectionString, command.CommandType, command.StatementString);
     }
     SqlParameter[] sqlParameters = command.DbParameters.Cast<SqlParameter>().ToArray();
     return SqlHelper.ExecuteReader(ConnectionString, command.CommandType, command.StatementString,
                                    sqlParameters);
 }
 public SqlServerQueryTranslator(SqlExpressCommand sqlCommand, Query query)
 {
     _sqlCommand = sqlCommand;
     _query = query;
 }
 public static IQueryTranslator Create(SqlExpressCommand command,Query query)
 {
     return new SqlServerQueryTranslator(command,query);
 }