public IActionResult Index() { _logger.LogInformation("HomeController Index started"); MarketResult currentMarket = _marketForecaster.GetMarketPrediction(); switch (currentMarket.MarketCondition) { case MarketCondition.StableDown: homeVM.MarketForecast = "Market stable going down"; break; case MarketCondition.StableUp: homeVM.MarketForecast = "Market stable going up"; break; case MarketCondition.Volatile: homeVM.MarketForecast = "Market is volatile"; break; default: homeVM.MarketForecast = "Situation Unknown with market"; break; } _logger.LogInformation("HomeController Index ended"); return(View(homeVM)); }
public IActionResult Index() { _logger.LogInformation("home Controller Index option Call"); HomeVM homeVM = new HomeVM(); MarketResult currentMarket = _marketForecaster.GetMarketPrediction(); switch (currentMarket.MarketCondition) { case MarketCondition.StableDown: homeVM.MarketForecast = "Market shows signs to go down in a stable state! It is a not a good sign to apply for credit applications! But extra credit is always piece of mind if you have handy when you need it."; break; case MarketCondition.StableUp: homeVM.MarketForecast = "Market shows signs to go up in a stable state! It is a great sign to apply for credit applications!"; break; case MarketCondition.Volatile: homeVM.MarketForecast = "Market shows signs of volatility. In uncertain times, it is good to have credit handy if you need extra funds!"; break; default: homeVM.MarketForecast = "Apply for a credit card using our application!"; break; } _logger.LogInformation("home Controller Index option end"); return(View(homeVM)); }
public IActionResult Index() { //Arriba hacemos lo mismo //HomeVM homeVM = new HomeVM(); //MarketForecasterV2 marketForecasterV2 = new MarketForecasterV2(); // MarketForecaster marketForecaster = new MarketForecaster(); MarketResult currentMarket = _marketForecaster.GetMarketPrediction(); switch (currentMarket.MarketCondition) { case MarketCondition.StableDown: homeVM.MarketForecast = "Market shows signs to go down in a stable state"; break; case MarketCondition.StableUp: homeVM.MarketForecast = "Market shows signs to go up in a stable state! It is a great sign to apply for credit applications!"; break; case MarketCondition.Volatile: homeVM.MarketForecast = "Market shows signs of volatility. In uncertain times, it is good to have credit handy if you need extra funds!"; break; default: homeVM.MarketForecast = "Apply for a credit card using our application!"; break; } return(View(homeVM)); }
public IActionResult Index() { MarketResult marketResult = _marketForecaster.GetMarketPrediction(); switch (marketResult.MarketCondition) { case MarketCondition.StableUp: _homeVM.MarketForecast = "Market shows going up"; break; case MarketCondition.StableDown: _homeVM.MarketForecast = "Market shows going down"; break; case MarketCondition.Volatile: _homeVM.MarketForecast = "Market shows being volatile"; break; default: _homeVM.MarketForecast = "Not returning data"; break; } return(View(_homeVM)); }
public IActionResult Index() { _logger.LogInformation("HomeController Index action called"); var marketCondition = _marketForecaster.GetMarketPrediction().MarketCondition.ToString(); var homeVM = new HomeViewModel { MarketForecast = $"Market is {marketCondition}" }; _logger.LogInformation("HomeController Index action ended"); return(View(homeVM)); }
public IActionResult Index() { MarketResult currentMarket = _marketForecaster.GetMarketPrediction(); switch (currentMarket.MarketCondition) { case MarketCondition.StableDown: homeVM.MarketForecast = "Markets show signs to go down in stable state."; break; case MarketCondition.StableUp: homeVM.MarketForecast = "Markets show signs to go up in stable state."; break; case MarketCondition.Volatile: homeVM.MarketForecast = "Markets show signs of volatility."; break; default: homeVM.MarketForecast = "Apply for a credit card using our application!"; break; } return(View(homeVM)); }
public IActionResult Index() { var currentMarket = _forecaster.GetMarketPrediction(); switch (currentMarket.MarketCondition) { case MarketCondition.StableDown: hVm.MarketForecast = "Market's crashing down!!!!"; break; case MarketCondition.Volatile: hVm.MarketForecast = "Market's all over the place!"; break; case MarketCondition.StableUp: hVm.MarketForecast = "Bull run jump aboard"; break; default: hVm.MarketForecast = "What's going on here!!!"; break; } return(View(hVm)); }