示例#1
0
        public void AddBranchLog(Branch branch, LogInformation logInfo)
        {
            var branchLog = new BranchLog
            {
                BranchLogIdentificator = _keyGenerator.GenerateNewId(),
                AlteredEntity          = branch,
                LogData = logInfo
            };

            _logRepository.AddBranchLog(branchLog);
        }
示例#2
0
        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);
 }