public async Task <IActionResult> PutInterviewInvitation(int id, InterviewInvitation interviewInvitation) { if (id != interviewInvitation.Id) { return(BadRequest()); } _context.Entry(interviewInvitation).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!InterviewInvitationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <InterviewInvitation> > PostInterviewInvitation(InterviewInvitation interviewInvitation) { _context.interviewInvitations.Add(interviewInvitation); await _context.SaveChangesAsync(); return(CreatedAtAction("GetInterviewInvitation", new { id = interviewInvitation.Id }, interviewInvitation)); }