Esempio n. 1
0
 private void CheckReadOnly(DbCommandBase cmd)
 {
     CheckReadOnly(cmd, cmd.IsSafeForReadOnly);
 }
Esempio n. 2
0
 /// <summary>
 /// Construct a new data reader, don't forget to dispose of it.
 /// </summary>
 /// <param name="sc"></param>
 /// <returns></returns>
 public DbConnectionReader ExecuteReader(DbCommandBase sc)
 {
     CheckReadOnly(sc);
     return new DbConnectionReader(this, sc);
 }
Esempio n. 3
0
 /// <summary>
 /// Helper method to open the connection, exec the command, and
 /// close even if there's an exception.
 /// </summary>
 /// <param name="sc"></param>
 public object ExecuteScalar(DbCommandBase sc)
 {
     CheckReadOnly(sc);
     return ExecuteScalarCommand(sc);
 }
Esempio n. 4
0
 /// <summary>
 /// Helper method to open the connection, exec the command, and
 /// close even if there's an exception.
 /// </summary>
 /// <param name="sc"></param>
 public int ExecuteNonQuery(DbCommandBase sc)
 {
     CheckReadOnly(sc);
     return ExecuteNonQueryCommand(sc);
 }