public async Task <IActionResult> Edit(int id, [Bind("Id,SelectDate,AvgTemp,AvgHum,MouldRisk")] InformationTableIndoor informationTableIndoor) { if (id != informationTableIndoor.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(informationTableIndoor); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InformationTableIndoorExists(informationTableIndoor.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(informationTableIndoor)); }
public async Task <IActionResult> Edit(int id, [Bind("weatherinfoId,date,clocktime,temperature,humidity,airpressure")] Weatherinfo weatherinfo) { if (id != weatherinfo.weatherinfoId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(weatherinfo); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!WeatherinfoExists(weatherinfo.weatherinfoId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(weatherinfo)); }