public async Task <ActionResult <Applyjob> > PostApplyjob(Applyjob applyjob) { _context.Applyjob.Add(applyjob); await _context.SaveChangesAsync(); return(CreatedAtAction("GetApplyjob", new { id = applyjob.ApplyId }, applyjob)); }
public async Task <IActionResult> PutApplyjob(int id, Applyjob applyjob) { if (id != applyjob.ApplyId) { return(BadRequest()); } _context.Entry(applyjob).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ApplyjobExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }