コード例 #1
0
		public async Task<ActionResult> CalculateAsync(TemperatureViewModel viewModel)
		{
			viewModel.Result = await converter.ConvertAsync(viewModel.Amount, (TemperatureUnit)viewModel.SelectedFrom, (TemperatureUnit)viewModel.SelectedTo);

			return View("Index", viewModel);
		}
コード例 #2
0
		public ActionResult Index()
		{
			TemperatureViewModel viewModel = new TemperatureViewModel();

			return View(viewModel);
		}