/// <summary>
 /// Add AccountSeriesOfNumbersRecord to database
 /// </summary>
 /// <param name="instance">AccountSeriesOfNumbersRecord instance</param>
 /// <param name="account">Account instance for shedule time</param>
 /// <param name="saveAfterInsert">Save database after insertion</param>
 /// <param name="waitUntilSaving">Wait until saving</param>
 public void AccountSeriesOfNumbersRecordAdd(AccountSeriesOfNumbersRecord instance, Account account, bool saveAfterInsert = true, bool waitUntilSaving = true)
 {
     AccountSeriesOfNumbersRecordAdd(new AccountSeriesOfNumbersRecord[] { instance }, account, saveAfterInsert, waitUntilSaving);
 }
 /// <summary>
 /// Remove AccountSeriesOfNumbersRecord from database
 /// </summary>
 /// <param name="instance">AccountSeriesOfNumbersRecord instance</param>
 /// <param name="saveAfterRemove">Save database after removing</param>
 /// <param name="waitUntilSaving">Wait until saving</param>
 public void AccountSeriesOfNumbersRecordRemove(AccountSeriesOfNumbersRecord instance, bool saveAfterRemove = true, bool waitUntilSaving = true)
 {
     AccountSeriesOfNumbersRecordRemove(new AccountSeriesOfNumbersRecord[] { instance }, saveAfterRemove, waitUntilSaving);
 }
 /// <summary>
 /// Create/Get new AccountSeriesOfNumbersRecord instance without any link to database
 /// </summary>
 /// <returns>AccountSeriesOfNumbersRecord instance</returns>
 public AccountSeriesOfNumbersRecord AccountSeriesOfNumbersRecordNew(Account account = null, TimeSpan? dalay = null, long? digitCount = null)
 {
     try
     {
         var res = new AccountSeriesOfNumbersRecord();
         if (dalay.HasValue)
             res.Delay = dalay.Value;
         if (digitCount.HasValue)
             res.DigitCount = digitCount.Value;
         if (account != null)
             account.SeriesOfNumbers.Add(res);
         return res;
     }
     catch(Exception ex)
     {
         Helpers.Log.Add(ex, string.Format("Repository.AccountSeriesOfNumbersRecordNew()"));
         throw;
     }
 }