Net.Sf.Dbdeploy.Scripts.ChangeScript.GetContent C# (CSharp) Method

GetContent() public method

Gets the SQL file update content.
public GetContent ( ) : string
return string
        public virtual string GetContent()
        {
            return this.GetFileContents();
        }

Usage Example

        protected void ApplyChangeScript(ChangeScript script)
        {
            ICollection<string> statements = this.splitter.Split(script.GetContent());

            int i = 0;

            foreach (var statement in statements)
            {
                try
                {
                    if (statements.Count > 1)
                    {
                        this.infoTextWriter.WriteLine(" -> statement " + (i + 1) + " of " + statements.Count + "...");
                    }

                    this.queryExecuter.Execute(statement);

                    i++;
                }
                catch (DbException e)
                {
                    throw new ChangeScriptFailedException(e, script, i + 1, statement);
                }
            }
        }
All Usage Examples Of Net.Sf.Dbdeploy.Scripts.ChangeScript::GetContent