public static Custodian CreateTestCustodian(this ICustodianAccountsCommand custodianAccountsCommand, string loginId, string firstName, string lastName, Guid affiliateId) { var custodian = new Custodian { EmailAddress = new EmailAddress { Address = string.Format(EmailAddressFormat, loginId) }, FirstName = firstName, LastName = lastName, }; custodianAccountsCommand.CreateCustodian(custodian, new LoginCredentials { LoginId = loginId, PasswordHash = LoginCredentials.HashToString(DefaultPassword) }, affiliateId); return(custodian); }
private void CreateCustodian(Community community, CreateCustodianModel model) { // For now use the old way of doing things. var custodian = new Custodian { EmailAddress = new EmailAddress { Address = model.EmailAddress }, FirstName = model.FirstName, LastName = model.LastName, }; var credentials = new LoginCredentials { LoginId = model.LoginId, PasswordHash = LoginCredentials.HashToString(model.Password), }; // Create the account. _custodianAccountsCommand.CreateCustodian(custodian, credentials, community.Id); }