Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
CommandSource Enum
Definition
- Namespace:
- Microsoft.EntityFrameworkCore.Diagnostics
- Assembly:
- Microsoft.EntityFrameworkCore.Relational.dll
- Package:
- Microsoft.EntityFrameworkCore.Relational v10.0.0
- Package:
- Microsoft.EntityFrameworkCore.Relational v6.0.0
- Package:
- Microsoft.EntityFrameworkCore.Relational v7.0.0
- Package:
- Microsoft.EntityFrameworkCore.Relational v8.0.0
- Package:
- Microsoft.EntityFrameworkCore.Relational v9.0.0
- Source:
- CommandSource.cs
- Source:
- CommandSource.cs
- Source:
- CommandSource.cs
- Source:
- CommandSource.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
| Name | Value | Description |
|---|---|---|
| Unknown | 0 | The command was generated from an unknown source. This usually indicates a database provider-generated command. |
| LinqQuery | 1 | The command was generated from a LINQ query on a DbSet<TEntity>. |
| SaveChanges | 2 | The command was generated from a call to SaveChanges() or SaveChangesAsync(CancellationToken) |
| Migrations | 3 | The command was generated by EF Core Migrations. |
| 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) |
| 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). |
| ValueGenerator | 6 | The command was generated by a ValueGenerator. |
| Scaffolding | 7 | The command was generated as part of scaffolding (reverse-engineering) from an existing database. |
| BulkUpdate | 8 | The command was generated as part of a bulk update. |
| ExecuteUpdate | 8 | The command was generated as part of an 'ExecuteUpdate' operation. |
| ExecuteDelete | 9 | The command was generated as part of an 'ExecuteDelete' operation. |
Remarks
See Logging, events, and diagnostics for more information and examples.
Applies to
Entity Framework
Feedback
Was this page helpful?
