public IActionResult Index()
        {
            ShowAllAccountsViewModel model = new ShowAllAccountsViewModel();

            model.Accounts = _accountFactory.AccountCollection().GetAllAccounts();
            return(View(model));
        }
        public IActionResult SaveEdit(ShowAllAccountsViewModel model)
        {
            IAccountCollection accountCollection = _accountFactory.AccountCollection();

            accountCollection.Update(new Account(model.AccountId, model.Name, model.Password, model.Active));

            return(RedirectToAction("Index", "Account"));
        }
        public IActionResult Details(int id)
        {
            Account account = _accountFactory.AccountCollection().GetById(id);

            ShowAllAccountsViewModel model = new ShowAllAccountsViewModel()
            {
                AccountId = id,
                Name      = account.Name,
                Password  = account.Password,
                Active    = account.Active
            };

            return(View(model));
        }