System.Data.Entity.SqlServer.SqlServerMigrationSqlGenerator.GenerateProcedureBody C# (CSharp) Method

GenerateProcedureBody() public method

Generates the SQL body for a stored procedure.
public GenerateProcedureBody ( ICollection commandTrees, string rowsAffectedParameter, string providerManifestToken ) : string
commandTrees ICollection The command trees representing the commands for an insert, update or delete operation.
rowsAffectedParameter string The rows affected parameter name.
providerManifestToken string The provider manifest token.
return string
        public override string GenerateProcedureBody(
            ICollection<DbModificationCommandTree> commandTrees,
            string rowsAffectedParameter,
            string providerManifestToken)
        {
            Check.NotNull(commandTrees, "commandTrees");
            Check.NotEmpty(providerManifestToken, "providerManifestToken");

            if (!commandTrees.Any())
            {
                return "RETURN";
            }

            InitializeProviderServices(providerManifestToken);

            return GenerateFunctionSql(commandTrees, rowsAffectedParameter);
        }