public async Task <IActionResult> PutaccEnter(int id, accEnter accEnter) { if (id != accEnter.idEnter) { return(BadRequest()); } _context.Entry(accEnter).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!accEnterExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
// To protect from overposting attacks, enable the specific properties you want to bind to, for // more details, see https://aka.ms/RazorPagesCRUD. public async Task <IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return(Page()); } _context.accUser.Add(user); await _context.SaveChangesAsync(); return(RedirectToPage("./Index")); }