Exemplo n.º 1
0
        public ActionResult Edit(int?currencyPK)
        {
            if (currencyPK != null)
            {
                ICurrenciesRepository currenciesRepository = new CurrenciesRepository(db);
                Currency     currency     = currenciesRepository.GetCurrencyByPK((int)currencyPK);
                CurrencyView currencyView = new CurrencyView();

                currencyView.ConvertFrom(currency, currencyView);

                return(View(currencyView));
            }
            else
            {
                return(RedirectToAction("Index", "Currency"));
            }
        }