public async Task <IActionResult> Edit(DateTime id, [Bind("DATEVALUE,MADECOUNT")] TempDateMade tempDateMade) { if (id != tempDateMade.DATEVALUE) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tempDateMade); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TempDateMadeExists(tempDateMade.DATEVALUE)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tempDateMade)); }
public async Task <IActionResult> Create([Bind("DATEVALUE,MADECOUNT")] TempDateMade tempDateMade) { if (ModelState.IsValid) { _context.Add(tempDateMade); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tempDateMade)); }