public async Task <bool> HandleAsync(GetImportRejectionByMovementId message) { var rejectMovement = await movementRejectionRepository.GetByMovementIdOrDefault(message.MovementId); if (rejectMovement == null) { return(false); } return(true); }
public async Task <RejectedMovementDetails> HandleAsync(GetRejectedImportMovementDetails message) { var movement = await movementRepository.Get(message.MovementId); var details = await rejectionRepository.GetByMovementIdOrDefault(message.MovementId); return(new RejectedMovementDetails { Number = movement.Number, Date = details.Date, Reason = details.Reason }); }