public async Task<ActionResult> CalculateAsync(TemperatureViewModel viewModel) { viewModel.Result = await converter.ConvertAsync(viewModel.Amount, (TemperatureUnit)viewModel.SelectedFrom, (TemperatureUnit)viewModel.SelectedTo); return View("Index", viewModel); }
public ActionResult Index() { TemperatureViewModel viewModel = new TemperatureViewModel(); return View(viewModel); }