DbMigration.CreateStoredProcedure 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.
Overloads
CreateStoredProcedure(String, String, Object) |
Adds an operation to create a new stored procedure. 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. |
CreateStoredProcedure<TParameters>(String, Func<ParameterBuilder,TParameters>, String, Object) |
Adds an operation to create a new stored procedure. 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. |
CreateStoredProcedure(String, String, Object)
Adds an operation to create a new stored procedure.
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.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
public void CreateStoredProcedure (string name, string body, object anonymousArguments = null);
member this.CreateStoredProcedure : string * string * obj -> unit
Public Sub CreateStoredProcedure (name As String, body As String, Optional anonymousArguments As Object = null)
Parameters
- name
- String
The name of the stored procedure. Schema name is optional, if no schema is specified then dbo is assumed.
- body
- String
The body of the stored procedure.
- anonymousArguments
- Object
The additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments. For example, 'new { SampleArgument = "MyValue" }'.
- Attributes
Applies to
CreateStoredProcedure<TParameters>(String, Func<ParameterBuilder,TParameters>, String, Object)
Adds an operation to create a new stored procedure.
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.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")]
public void CreateStoredProcedure<TParameters> (string name, Func<System.Data.Entity.Migrations.Builders.ParameterBuilder,TParameters> parametersAction, string body, object anonymousArguments = null);
member this.CreateStoredProcedure : string * Func<System.Data.Entity.Migrations.Builders.ParameterBuilder, 'Parameters> * string * obj -> unit
Public Sub CreateStoredProcedure(Of TParameters) (name As String, parametersAction As Func(Of ParameterBuilder, TParameters), body As String, Optional anonymousArguments As Object = null)
Type Parameters
- TParameters
The parameters in this create stored procedure operation. You do not need to specify this
type, it will be inferred from the parametersAction
parameter you supply.
Parameters
- name
- String
The name of the stored procedure. Schema name is optional, if no schema is specified then dbo is assumed.
- parametersAction
- Func<ParameterBuilder,TParameters>
The action that specifies the parameters of the stored procedure.
- body
- String
The body of the stored procedure.
- anonymousArguments
- Object
The additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments. For example, 'new { SampleArgument = "MyValue" }'.
- Attributes
Applies to
Entity Framework