EntityCommand EntityCommand EntityCommand Class

Definition

Class representing a command for the conceptual layer

public class EntityCommand : System.Data.Common.DbCommand
type EntityCommand = class
    inherit DbCommand
Public Class EntityCommand
Inherits DbCommand
Inheritance
EntityCommandEntityCommandEntityCommand

Constructors

EntityCommand() EntityCommand() EntityCommand()

Initializes a new instance of the EntityCommand class using the specified values.

EntityCommand(String) EntityCommand(String) EntityCommand(String)

Initializes a new instance of the EntityCommand class with the specified statement.

EntityCommand(String, EntityConnection) EntityCommand(String, EntityConnection) EntityCommand(String, EntityConnection)

Initializes a new instance of the EntityCommand class with the specified statement and connection.

EntityCommand(String, EntityConnection, EntityTransaction) EntityCommand(String, EntityConnection, EntityTransaction) EntityCommand(String, EntityConnection, EntityTransaction)

Initializes a new instance of the EntityCommand class with the specified statement, connection and transaction.

EntityCommand(String, EntityConnection, IDbDependencyResolver) EntityCommand(String, EntityConnection, IDbDependencyResolver) EntityCommand(String, EntityConnection, IDbDependencyResolver)

Constructs the EntityCommand object with the given eSQL statement and the connection object to use

Properties

CommandText CommandText CommandText

Gets or sets an Entity SQL statement that specifies a command or stored procedure to execute.

CommandTimeout CommandTimeout CommandTimeout

Gets or sets the amount of time to wait before timing out.

CommandTree CommandTree CommandTree

Gets or sets the command tree to execute; only one of the command tree or the command text can be set, not both.

CommandType CommandType CommandType

Gets or sets a value that indicates how the CommandText property is to be interpreted.

Connection Connection Connection

Gets or sets the EntityConnection used by the EntityCommand .

DbConnection DbConnection DbConnection

The connection object used for executing the command

DbParameterCollection DbParameterCollection DbParameterCollection

The collection of parameters for this command

DbTransaction DbTransaction DbTransaction

The transaction that this command executes in

DesignTimeVisible DesignTimeVisible DesignTimeVisible

Gets or sets a value that indicates whether the command object should be visible in a Windows Form Designer control.

EnablePlanCaching EnablePlanCaching EnablePlanCaching

Gets or sets a value that indicates whether the query plan caching is enabled.

Parameters Parameters Parameters

Gets the parameters of the Entity SQL statement or stored procedure.

Transaction Transaction Transaction

Gets or sets the transaction within which the SqlCommand executes.

UpdatedRowSource UpdatedRowSource UpdatedRowSource

Gets or sets how command results are applied to rows being updated.

Methods

Cancel() Cancel() Cancel()

Cancels the execution of an EntityCommand.

CreateDbParameter() CreateDbParameter() CreateDbParameter()

Create and return a new parameter object representing a parameter in the eSQL statement

CreateParameter() CreateParameter() CreateParameter()

Creates a new instance of an EntityParameter object.

ExecuteDbDataReader(CommandBehavior) ExecuteDbDataReader(CommandBehavior) ExecuteDbDataReader(CommandBehavior)

Executes the command and returns a data reader for reading the results

ExecuteDbDataReaderAsync(CommandBehavior, CancellationToken) ExecuteDbDataReaderAsync(CommandBehavior, CancellationToken) ExecuteDbDataReaderAsync(CommandBehavior, CancellationToken)

Asynchronously executes the command and returns a data reader for reading the results

ExecuteNonQuery() ExecuteNonQuery() ExecuteNonQuery()

Executes the current command.

ExecuteNonQueryAsync(CancellationToken) ExecuteNonQueryAsync(CancellationToken) ExecuteNonQueryAsync(CancellationToken)

Asynchronously executes the command and discard any results returned from the command

ExecuteReader() ExecuteReader() ExecuteReader()

Executes the command and returns a data reader.

ExecuteReader(CommandBehavior) ExecuteReader(CommandBehavior) ExecuteReader(CommandBehavior)

Compiles the CommandText into a command tree and passes it to the underlying store provider for execution, then builds an EntityDataReader out of the produced result set using the specified CommandBehavior .

ExecuteReaderAsync(CommandBehavior, CancellationToken) ExecuteReaderAsync(CommandBehavior, CancellationToken) ExecuteReaderAsync(CommandBehavior, CancellationToken)

Asynchronously executes the command and returns a data reader for reading the results. May only be called on CommandType.CommandText (otherwise, use the standard Execute* methods)

ExecuteReaderAsync(CancellationToken) ExecuteReaderAsync(CancellationToken) ExecuteReaderAsync(CancellationToken)

Asynchronously executes the command and returns a data reader for reading the results. May only be called on CommandType.CommandText (otherwise, use the standard Execute* methods)

ExecuteReaderAsync(CommandBehavior) ExecuteReaderAsync(CommandBehavior) ExecuteReaderAsync(CommandBehavior)

Asynchronously executes the command and returns a data reader for reading the results. May only be called on CommandType.CommandText (otherwise, use the standard Execute* methods)

ExecuteReaderAsync() ExecuteReaderAsync() ExecuteReaderAsync()

Asynchronously executes the command and returns a data reader for reading the results. May only be called on CommandType.CommandText (otherwise, use the standard Execute* methods)

ExecuteScalar() ExecuteScalar() ExecuteScalar()

Executes the command, and returns the first column of the first row in the result set. Additional columns or rows are ignored.

Prepare() Prepare() Prepare()

Compiles the entity-level command and creates a prepared version of the command.

ToTraceString() ToTraceString() ToTraceString()

Compiles the entity-level command and returns the store command text.

Applies to