public async Task <ActionResult <BabysitterResume> > PostBabysitterResume(BabysitterResume babysitterResume) { _context.BabysitterResume.Add(babysitterResume); await _context.SaveChangesAsync(); return(CreatedAtAction("GetBabysitterResume", new { id = babysitterResume.Id }, babysitterResume)); }
public async Task <IActionResult> PutBabysitterResume(int id, BabysitterResume babysitterResume) { if (id != babysitterResume.Id) { return(BadRequest()); } _context.Entry(babysitterResume).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BabysitterResumeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }