Sharp.Migrations.Runners.ScriptCreator.ScriptCreatorRunner.GetCreatedScript C# (CSharp) Method

GetCreatedScript() public method

public GetCreatedScript ( ) : string
return string
        public string GetCreatedScript()
        {
            return _script.ToString();
        }

Usage Example

コード例 #1
0
 private static void RunScript(int version)
 {
     if (String.IsNullOrEmpty(_options.Filename)) {
         Exit();
     }
     var runner = new ScriptCreatorRunner(SharpFactory.Default.CreateDataClient(), GetAssemblyWithMigrations());
     runner.Run(version, _options.MigrationGroup);
     File.WriteAllText(_options.Filename, runner.GetCreatedScript(), Encoding.UTF8);
     Console.WriteLine(" * Check {0} for the script dump. No migrations were performed on the database.", _options.Filename);
 }