CommandSource Enum

Definition

Enum used by CommandEventData, and subclasses to indicate the source of the DbCommand being used to execute the command.

public enum CommandSource
type CommandSource = 
Public Enum CommandSource
Inheritance
CommandSource

Fields

BulkUpdate 8

The command was generated as part of a bulk update.

ExecuteDelete 9

The command was generated as part of an 'ExecuteDelete' operation.

ExecuteSqlRaw 5

The command was generated from a call to ExecuteSqlRaw(DatabaseFacade, String, Object[]), ExecuteSqlRawAsync(DatabaseFacade, String, CancellationToken), ExecuteSql(DatabaseFacade, FormattableString), ExecuteSqlAsync(DatabaseFacade, FormattableString, CancellationToken), ExecuteSqlInterpolated(DatabaseFacade, FormattableString), or ExecuteSqlInterpolatedAsync(DatabaseFacade, FormattableString, CancellationToken).

ExecuteUpdate 8

The command was generated as part of an 'ExecuteUpdate' operation.

FromSqlQuery 4

The command was generated from a call to FromSql<TEntity>(DbSet<TEntity>, FormattableString), FromSqlRaw<TEntity>(DbSet<TEntity>, String, Object[]) or FromSqlInterpolated<TEntity>(DbSet<TEntity>, FormattableString)

LinqQuery 1

The command was generated from a LINQ query on a DbSet<TEntity>.

Migrations 3

The command was generated by EF Core Migrations.

SaveChanges 2

The command was generated from a call to SaveChanges() or SaveChangesAsync(CancellationToken)

Scaffolding 7

The command was generated as part of scaffolding (reverse-engineering) from an existing database.

Unknown 0

The command was generated from an unknown source. This usually indicates a database provider-generated command.

ValueGenerator 6

The command was generated by a ValueGenerator.

Remarks

See Logging, events, and diagnostics for more information and examples.

Applies to