private void CheckReadOnly(DbCommandBase cmd)
 {
     CheckReadOnly(cmd, cmd.IsSafeForReadOnly);
 }
 /// <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);
 }
 /// <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);
 }
 /// <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);
 }