Ejemplo n.º 1
0
        public AccountRegisterViewModel GetAccount(IDataProtector protector, string account)
        {
            if (!string.IsNullOrEmpty(account))
            {
                var idAccount      = Guid.Parse(protector.Unprotect(account));
                var currentAccount = _accountDao.Get(idAccount);

                return(new AccountRegisterViewModel()
                {
                    Code = currentAccount.Code,
                    Id = protector.Protect(currentAccount.Id.ToString()),
                    Name = currentAccount.Name,
                    StatusRegister = currentAccount.StatusRegister
                });
            }

            return(new AccountRegisterViewModel());
        }