public async Task <IActionResult> Create([Bind("Id,TimeStamp,InsideOrOutside,Temp,AirHumidity,RiskForMold")] JoinTables joinTables) { if (ModelState.IsValid) { _context.Add(joinTables); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(joinTables)); }
public async Task <IActionResult> Create([Bind("Id,TimeStamp")] Date date) { if (ModelState.IsValid) { _context.Add(date); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(date)); }
public async Task <IActionResult> Create([Bind("Id,InsideOrOutside,DateId")] Enviornment enviornment) { if (ModelState.IsValid) { _context.Add(enviornment); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["DateId"] = new SelectList(_context.Dates, "Id", "Id", enviornment.DateId); return(View(enviornment)); }
public async Task <IActionResult> Create([Bind("Id,Temp,EnviornmentId")] Temperature temperature) { if (ModelState.IsValid) { _context.Add(temperature); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["EnviornmentId"] = new SelectList(_context.Enviornments, "Id", "Id", temperature.EnviornmentId); return(View(temperature)); }
public async Task <IActionResult> Create([Bind("Id,AirHumidity,EnviornmentId")] Humidity humidity) { if (ModelState.IsValid) { _context.Add(humidity); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } ViewData["EnviornmentId"] = new SelectList(_context.Enviornments, "Id", "Id", humidity.EnviornmentId); return(View(humidity)); }