Share via


SqlOperation(String, Object) Constructor

Definition

Initializes a new instance of the SqlOperation class.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

public SqlOperation (string sql, object anonymousArguments = null);
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
public SqlOperation (string sql, object anonymousArguments = null);
new System.Data.Entity.Migrations.Model.SqlOperation : string * obj -> System.Data.Entity.Migrations.Model.SqlOperation
Public Sub New (sql As String, Optional anonymousArguments As Object = null)

Parameters

sql
String

The SQL to be executed.

anonymousArguments
Object

Additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments e.g. 'new { SampleArgument = "MyValue" }'.

Attributes

Applies to