Exemplo n.º 1
0
        public AccountModel Update(AccountModel accountModel)
        {
            accountBusinessRules.UpdateCheck(accountModel, unitOfWork.Account);

            var account = unitOfWork.Account.GetById(a => a.Guid == accountModel.Id.Value);

            accountAdapter.Update(account, accountModel);
            unitOfWork.Account.Update(account);
            unitOfWork.Save();

            return(GetAccountByUsername(accountModel.Username));
        }