public async Task <IActionResult> Edit(string id, [Bind("Kvote,Øl,Brus,Gratis,UpsizeTs")] TblKvotedefinisjoner tblKvotedefinisjoner) { if (id != tblKvotedefinisjoner.Kvote) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(tblKvotedefinisjoner); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TblKvotedefinisjonerExists(tblKvotedefinisjoner.Kvote)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(tblKvotedefinisjoner)); }
public async Task <IActionResult> Create([Bind("Kvote,Øl,Brus,Gratis,UpsizeTs")] TblKvotedefinisjoner tblKvotedefinisjoner) { if (ModelState.IsValid) { _context.Add(tblKvotedefinisjoner); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(tblKvotedefinisjoner)); }