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); }
public DuplicateEDModel Add(DuplicateEDModel duplicateEDModel) { return(_eDModelContext.DuplicateEDModel.Add(duplicateEDModel).Entity); }