public async Task <ActionResult <PicUsers> > PostPicUsers(PicUsers picUsers) { _context.PicUsers.Add(picUsers); await _context.SaveChangesAsync(); return(CreatedAtAction("GetPicUsers", new { id = picUsers.UseNcode }, picUsers)); }
public async Task <IActionResult> PutPicUsers(int id, PicUsers picUsers) { if (id != picUsers.UseNcode) { return(BadRequest()); } _context.Entry(picUsers).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PicUsersExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }