コード例 #1
0
        public async Task Handle(EDDuplicateDomainEvent notification, CancellationToken cancellationToken)
        {
            DuplicateEDModel duplicateEDModel = new DuplicateEDModel
            {
                Amount             = notification.Amount,
                CoverageDateFrom   = notification.CoverageDateFrom,
                CoverageDateTo     = notification.CoverageDateTo,
                EmployeeId         = notification.EmployeeId,
                FirstName          = notification.FirstName,
                LastName           = notification.LastName,
                PayCode            = notification.PayCode,
                PayCodeDescription = notification.PayCodeDescription,
                PayDateFrom        = notification.PayDateFrom,
                PayDateTo          = notification.PayDateTo,
                Remarks            = notification.Remarks
            };

            _duplicateEDRepository.Add(duplicateEDModel);

            await _duplicateEDRepository.UnitOfWork
            .SaveEntitiesAsync(cancellationToken);
        }
コード例 #2
0
 public DuplicateEDModel Add(DuplicateEDModel duplicateEDModel)
 {
     return(_eDModelContext.DuplicateEDModel.Add(duplicateEDModel).Entity);
 }