public void ChangeUserEmailAddress(ChangeEmailAddressCommand command) { var user = GetExistingUser(command.TenantId, command.Username); user.Person.ContactInformation.ChangeEmailAddress(new EmailAddress(command.EmailAddress)); this.unitOfWork.Commit(); }
public async Task <IActionResult> CreateRegistration(Guid id, ChangeEmailAddressCommand request) { request.ApprenticeId = id; await _mediator.Send(request); return(Accepted()); }
public void GivenAChangeEmailCommandWithAValidEmailAddress() { _command = _fixture .Build <ChangeEmailAddressCommand>() .Without(p => p.ApprenticeId) .With(p => p.Email, (MailAddress adr) => adr.ToString()) .Create(); }
public void GivenAnApprenticeExists() { _command = _fixture.Create <ChangeEmailAddressCommand>(); }