public async Task <IActionResult> Edit(int id, [Bind("OstvareniPopust,KorisnickoIme,DatumRodjenja,KrajVazenjaClanarine,Id,Lozinka,Ime,Prezime,Email")] VipKorisnik vipKorisnik) { if (id != vipKorisnik.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(vipKorisnik); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!VipKorisnikExists(vipKorisnik.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(vipKorisnik)); }
public async Task <IActionResult> Create([Bind("OstvareniPopust,KorisnickoIme,DatumRodjenja,KrajVazenjaClanarine,Id,Lozinka,Ime,Prezime,Email")] VipKorisnik vipKorisnik) { if (ModelState.IsValid) { _context.Add(vipKorisnik); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(vipKorisnik)); }