Пример #1
0
        public bool RemoveAccount(string accountId)
        {
            if (!IsExits())
            {
                return(false);
            }

            var account = _accountRepository.Get(accountId);

            if (account == null)
            {
                EwhStatus = core.Enums.GlobalStatus.Account_NotFound;
                return(false);
            }
            var removeAccountDto = new RemoveWebsiteAccountModel()
            {
                Account = account, Website = _website
            };

            _websiteRepository.RemoveAccount(removeAccountDto);
            _accountRepository.RemoveWebsite(removeAccountDto);
            return(true);
        }