public async Task <IActionResult> Edit(int id, [Bind("InitX,X,InitY,Y,Period,Id")] Incl incl) { if (id != incl.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(incl); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InclExists(incl.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(incl)); }
public async Task <IActionResult> Create([Bind("InitX,X,InitY,Y,Period,Id")] Incl incl) { if (ModelState.IsValid) { _context.Add(incl); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(incl)); }