public void AddBranchLog(Branch branch, LogInformation logInfo) { var branchLog = new BranchLog { BranchLogIdentificator = _keyGenerator.GenerateNewId(), AlteredEntity = branch, LogData = logInfo }; _logRepository.AddBranchLog(branchLog); }
public void AddBranchesLogs(ICollection <Branch> branches, LogInformation logInfo) { foreach (var branch in branches) { var branchLog = new BranchLog { BranchLogIdentificator = _keyGenerator.GenerateNewId(), AlteredEntity = branch, LogData = logInfo }; _logRepository.AddBranchLog(branchLog); } }
public void AddBranchLog(BranchLog branchLog) { _context.db.GetCollection <BranchLog>(_branchesLogCollectionName).InsertOne(branchLog); }