public async Task <IActionResult> PutAppleAppApproverModel(long id, AppleAppApproverModel appleAppApproverModel) { if (id != appleAppApproverModel.Id) { return(BadRequest()); } _context.Entry(appleAppApproverModel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AppleAppApproverModelExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <AppleAppApproverModel> > PostAppleAppApproverModel(AppleAppApproverModel appleAppApproverModel) { _context.AppleAppApprovers.Add(appleAppApproverModel); await _context.SaveChangesAsync(); return(CreatedAtAction("GetAppleAppApproverModel", new { id = appleAppApproverModel.Id }, appleAppApproverModel)); }