DbMigration.AlterStoredProcedure Method
Assembly: EntityFramework (in EntityFramework.dll)
Name | Description | |
---|---|---|
![]() | AlterStoredProcedure(String, String, Object) | Adds an operation to alter a 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. |
![]() | AlterStoredProcedure<TParameters>(String, Func<ParameterBuilder, TParameters>, String, Object) | Adds an operation to alter a 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. |
DbMigration.AlterStoredProcedure Method (String, String, Object)
Adds an operation to alter a 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.
[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")] public void AlterStoredProcedure( string name, string body, object anonymousArguments = null )
Parameters
- name
-
Type:
System.String
The name of the stored procedure. Schema name is optional, if no schema is specified then dbo is assumed.
- body
-
Type:
System.String
The body of the stored procedure.
- anonymousArguments
-
Type:
System.Object
The additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments. For example, 'new { SampleArgument = "MyValue" }'.
DbMigration.AlterStoredProcedure<TParameters> Method (String, Func<ParameterBuilder, TParameters>, String, Object)
Adds an operation to alter a 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.
[SuppressMessageAttribute("Microsoft.Design", "CA1026:DefaultParametersShouldNotBeUsed")] public void AlterStoredProcedure<TParameters>( string name, Func<ParameterBuilder, TParameters> parametersAction, string body, object anonymousArguments = null )
Parameters
- name
-
Type:
System.String
The name of the stored procedure. Schema name is optional, if no schema is specified then dbo is assumed.
- parametersAction
-
Type:
System.Func<ParameterBuilder, TParameters>
The action that specifies the parameters of the stored procedure.
- body
-
Type:
System.String
The body of the stored procedure.
- anonymousArguments
-
Type:
System.Object
The additional arguments that may be processed by providers. Use anonymous type syntax to specify arguments. For example, 'new { SampleArgument = "MyValue" }'.
Type Parameters
- TParameters
The parameters in this alter stored procedure operation. You do not need to specify this type, it will be inferred from the parametersAction parameter you supply.