Example #1
0
        public async Task <int> AddAccount(AccountViewModel model)
        {
            int id = 0;

            try
            {
                Account account = Copy.CopyToAccount(model);
                id = await this._accountRepository.Add(account);
            }
            catch (AccountException)
            {
                id = int.MinValue;
            }

            return(id);
        }