public Client(Account account) : this() { if (account == null) throw new ArgumentNullException("account"); Account = account; Account.AddRole(Role.Client); }
public Client(Account account) : this() { if (account == null) { throw new ArgumentNullException("account"); } Account = account; Account.AddRole(Role.Client); }
/// <summary> /// Регистрация пользователя /// </summary> private void Scenario1() { using (unitOfWorkFactory.Create()) { var account = new Account("email", "password"); account.AddRole(Role.Admin); accountRepository.Save(account); } }