/// <summary> /// Opens new account with given information /// </summary> /// <param name="accountOwner">The owner of the account</param> /// <param name="accountType">The account type</param> /// <param name="numberCreateService">Service for creating unique account number</param> public void OpenAccount(string accountOwner, Interface.Entities.AccountType accountType, IAccountNumberCreateService numberCreateService) { string accountNumber = numberCreateService.GetNumber(); Interface.Entities.Account account = new Interface.Entities.Account(accountNumber, accountOwner, accountType); _repository.OpenAccount(AccountMapper.MapToData(account)); }