public async Task <IActionResult> PutEexternalReferenceInformation(long id, EexternalReferenceInformation eexternalReferenceInformation) { if (id != eexternalReferenceInformation.EexternalReferenceInformationId) { return(BadRequest()); } _context.Entry(eexternalReferenceInformation).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EexternalReferenceInformationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <EexternalReferenceInformation> > PostEexternalReferenceInformation(EexternalReferenceInformation eexternalReferenceInformation) { _context.EexternalReferenceInformation.Add(eexternalReferenceInformation); try { await _context.SaveChangesAsync(); } catch (DbUpdateException) { if (EexternalReferenceInformationExists(eexternalReferenceInformation.EexternalReferenceInformationId)) { return(Conflict()); } else { throw; } } return(CreatedAtAction("GetEexternalReferenceInformation", new { id = eexternalReferenceInformation.EexternalReferenceInformationId }, eexternalReferenceInformation)); }