Skip to content

Commit

Permalink
auto generate TRN for form a mat A2B applications
Browse files Browse the repository at this point in the history
  • Loading branch information
paullocknimble committed Nov 1, 2024
1 parent 6c432e1 commit 5cf9135
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,18 @@ public async Task<CommandResult> Handle(CreateFormAMatProjectsCommand request,
{
// create formAMat
formAMat = FormAMatProject.Create(conversionProject.Details.NameOfTrust, conversionProject.Details.ApplicationReferenceNumber, _dateTimeProvider.Now);
_formAMatProjectRepository.Insert(formAMat as FormAMatProject);
_formAMatProjectRepository.CreateFormAMatProjectWithTrustReferenceNumber(formAMat);
await _formAMatProjectRepository.UnitOfWork.SaveChangesAsync(cancellationToken);
}

conversionProject.SetFormAMatProjectId(formAMat.Id);
conversionProject.SetIncomingTrust(formAMat.TrustReferenceNumber, conversionProject.Details.NameOfTrust);

_conversionProjectRepository.Update(conversionProject as Domain.ProjectAggregate.Project);
}


await _conversionProjectRepository.UnitOfWork.SaveChangesAsync(cancellationToken);


// returning 'CommandSuccessResult', client will have to retrieve the updated transfer project to refresh data
return new CommandSuccessResult();
}
Expand Down

0 comments on commit 5cf9135

Please sign in to comment.