public async Task <IActionResult> Edit(long id, [Bind("SkinootsId,Producer,Model,Size,Price,Quantity,CratedDate")] Skiboots skiboots) { if (id != skiboots.SkinootsId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(skiboots); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SkibootsExists(skiboots.SkinootsId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(skiboots)); }
public async Task <IActionResult> Create([Bind("SkinootsId,Producer,Model,Size,Price,Quantity,CratedDate")] Skiboots skiboots) { if (ModelState.IsValid) { _context.Add(skiboots); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(skiboots)); }