/// <summary> /// Method to change the journal between NullJournal and SqlTable journal. /// </summary> /// <param name="builder">The builder.</param> /// <param name="toggleNullJournal">if set to <c>true</c> configures the NullJournal.</param> /// <param name="table">The database table to save the journal.</param> /// <returns>The builder itself.</returns> /// <exception cref="ArgumentNullException">The database table to save the </exception> public static UpgradeEngineBuilder JournalToggle(this UpgradeEngineBuilder builder, bool toggleNullJournal = true, string table = null) { if (toggleNullJournal) { builder.JournalTo(new NullJournal()); } else { if (String.IsNullOrWhiteSpace(table)) { throw new ArgumentNullException(nameof(table)); } builder .JournalToSqlTable("dbo", table); } return(builder); }