Example #1
0
 /// <summary>
 /// ChangeLog activation for Rename.Column(..) syntax <br/>
 /// ----------------------------------------------------<br/>
 /// It will be possible to add custom logging on all table operations.<br/>
 /// The interface <see cref="ICustomMigrationProcessor{T}"/> must be implemented and registered in the IoC container (<see cref="IServiceCollection"/> )<br/>
 /// Method <see cref="ICustomMigrationProcessor.Process(IChangeLogTabledExpression)"/><br/>
 /// can be used to implementing your preferred custom logging <br/>
 /// <br/>
 /// See the example of a implementation of <see cref="ICustomMigrationProcessor{T}"/>:<br/>
 /// <a href="https://github.com/DIPSAS/FluentDbTools/blob/master/src/FluentDbTools/Tests/Test.FluentDbTools.Migration/TestOracleCustomMigrationProcessor.cs">https://github.com/DIPSAS/FluentDbTools/blob/master/src/FluentDbTools/Tests/Test.FluentDbTools.Migration/TestOracleCustomMigrationProcessor.cs</a><br/>
 /// <br/>
 /// Can be registered like this:<br/>
 /// <code type="csharp">
 ///     <see cref="IServiceCollection">serviceCollection</see>.AddSingleton&lt;ICustomMigrationProcessor&lt;OracleProcessor&gt;,TestOracleCustomMigrationProcessor&gt;();
 /// </code>
 /// </summary>
 /// <param name="syntax"></param>
 /// <param name="changeLog"></param>
 /// <param name="migration"></param>
 /// <returns><see cref="IRenameColumnToSyntax"/></returns>
 public static IRenameColumnToSyntax WithChangeLog(this IRenameColumnToSyntax syntax, ChangeLogContext changeLog, IMigrationModel migration)
 {
     return(AddChangeLogDynamicSyntax(syntax, changeLog, migration));
 }
Example #2
0
 /// <summary>
 /// Specify the new column name.
 /// </summary>
 /// <param name="syntax">Rename Column Syntax to extend</param>
 /// <param name="newColumnName">The new column name</param>
 /// <param name="migration">null can be used</param>
 /// <returns>Return the <paramref name="syntax"/></returns>
 public static IRenameColumnToSyntax To(this IRenameColumnToSyntax syntax, string newColumnName, IMigrationModel migration)
 {
     syntax.To(newColumnName);
     return(syntax);
 }