MigrationBuilder.Sql(String, Boolean) Method
Definition
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.
Builds an SqlOperation to execute raw SQL.
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.SqlOperation> Sql (string sql, bool suppressTransaction = false);
abstract member Sql : string * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.SqlOperation>
override this.Sql : string * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.SqlOperation>
Public Overridable Function Sql (sql As String, Optional suppressTransaction As Boolean = false) As OperationBuilder(Of SqlOperation)
Parameters
- sql
- String
The SQL string to be executed to perform the operation.
- suppressTransaction
- Boolean
Indicates whether or not transactions will be suppressed while executing the SQL.
Returns
A builder to allow annotations to be added to the operation.
Remarks
See Database migrations for more information and examples.
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för