コード例 #1
0
        public async Task <DeletedViewModel> Handle(DeletedQuery request, CancellationToken cancellationToken)
        {
            _journeyInstance.ThrowIfNotCompleted();

            var providerId = _journeyInstance.State.ProviderId;

            var liveApprenticeships = await _sqlQueryDispatcher.ExecuteQuery(new GetApprenticeshipsForProvider()
            {
                ProviderId = providerId
            });

            return(new DeletedViewModel()
            {
                ApprenticeshipTitle = _journeyInstance.State.ApprenticeshipTitle,
            });
        }
コード例 #2
0
        public async Task <DeletedViewModel> Handle(DeletedQuery request, CancellationToken cancellationToken)
        {
            _journeyInstance.ThrowIfNotCompleted();

            var providerId = _journeyInstance.State.ProviderId;

            var liveTLevels = await _sqlQueryDispatcher.ExecuteQuery(new GetTLevelsForProvider()
            {
                ProviderId = providerId
            });

            return(new DeletedViewModel()
            {
                TLevelName = _journeyInstance.State.TLevelName,
                HasOtherTLevels = liveTLevels.Count > 0,
                ProviderId = providerId,
                YourReference = _journeyInstance.State.YourReference
            });
        }
 private void ThrowIfFlowStateNotValid()
 {
     _journeyInstance.ThrowIfNotCompleted();
 }