public async Task <IActionResult> Edit(int id, [Bind("Id,Username,Pass,Reply,Authdate")] Radpostauth radpostauth) { if (id != radpostauth.Id) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(radpostauth); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RadpostauthExists(radpostauth.Id)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(radpostauth)); }
public async Task <IActionResult> Create([Bind("Id,Username,Pass,Reply,Authdate")] Radpostauth radpostauth) { if (ModelState.IsValid) { _context.Add(radpostauth); await _context.SaveChangesAsync(); return(RedirectToAction(nameof(Index))); } return(View(radpostauth)); }