/// <summary> /// save current record and log /// </summary> /// <param name="logTransaction"></param> public virtual void SaveAndLog(LogTransaction logTransaction) { logTransaction.Add(this); this.Save(); //logTransaction.Remove(this); }
//public abstract int TableId { get; } //public abstract string CreateTableString { get; } /// <summary> /// make this dpo record loggable /// </summary> /// <param name="transaction"></param> public void AddLog(LogTransaction transaction) { AddLog(transaction.transaction); }
/// <summary> /// /// </summary> /// <param name="log"></param> /// <returns></returns> public async Task RegisterLogTransactionAsync(LogTransaction log) { var logTransaction = MongoDatabaseInstance.GetCollection <LogTransaction>(LogCollection); await logTransaction.InsertOneAsync(log); }