public async Task <ActionResult <Careerinformation> > PostCareerinformation(Careerinformation careerinformation) { _context.Careerinformations.Add(careerinformation); await _context.SaveChangesAsync(); return(CreatedAtAction("GetCareerinformation", new { id = careerinformation.ID }, careerinformation)); }
public async Task <IActionResult> PutCareerinformation(int id, Careerinformation careerinformation) { if (id != careerinformation.ID) { return(BadRequest()); } _context.Entry(careerinformation).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CareerinformationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }