Share via


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
EntityCommand

Constructors

EntityCommand()

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

EntityCommand(String, EntityConnection, EntityTransaction)

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

EntityCommand(String, EntityConnection, IDbDependencyResolver)

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

EntityCommand(String, EntityConnection)

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

EntityCommand(String)

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

Properties

CommandText

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

CommandTimeout

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

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

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

Connection

Gets or sets the EntityConnection used by the EntityCommand .

DbConnection

The connection object used for executing the command

DbParameterCollection

The collection of parameters for this command

DbTransaction

The transaction that this command executes in

DesignTimeVisible

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

EnablePlanCaching

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

Parameters

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

Transaction

Gets or sets the transaction within which the SqlCommand executes.

UpdatedRowSource

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

Methods

Cancel()

Cancels the execution of an EntityCommand.

CreateDbParameter()

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

CreateParameter()

Creates a new instance of an EntityParameter object.

ExecuteDbDataReader(CommandBehavior)

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

ExecuteDbDataReaderAsync(CommandBehavior, CancellationToken)

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

ExecuteNonQuery()

Executes the current command.

ExecuteNonQueryAsync(CancellationToken)

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

ExecuteReader()

Executes the command and returns a data reader.

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()

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)

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, 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)

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()

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

Prepare()

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

ToTraceString()

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

Applies to