public SystemAccount Create(Organization organization, string identifier, Email email) { var systemAccount = new SystemAccount(organization, identifier, email); _systemAccountRepository.MakePersistent(systemAccount); return(systemAccount); }
/// <summary> /// Creates the system account. /// </summary> /// <param name="identifier">The identifier.</param> /// <param name="displayName">The display name.</param> /// <param name="emailAddress">The email address.</param> /// <param name="identityProviderName">Name of the identity provider.</param> /// <param name="identityProviderUri">The identity provider URI.</param> /// <returns> /// A SystemAccount. /// </returns> public SystemAccount CreateSystemAccount(string identifier, string displayName, EmailAddress emailAddress, string identityProviderName, string identityProviderUri) { var account = new SystemAccount(identifier, displayName, emailAddress, identityProviderName, identityProviderUri); _repository.MakePersistent(account); return(account); }