public async Task <IActionResult> Edit(int id, [Bind("FuckitId,Name,Quantity")] Fuckit fuckit) { if (id != fuckit.FuckitId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(fuckit); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FuckitExists(fuckit.FuckitId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(fuckit)); }
public async Task <IActionResult> Create([Bind("FuckitId,Name,Quantity")] Fuckit fuckit) { if (ModelState.IsValid) { _context.Add(fuckit); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(fuckit)); }