public async Task <IActionResult> PutCatalogue(int id, Catalogue catalogue) { logger.LogInformation("PutCatalogue"); if (id != catalogue.Id) { return(BadRequest()); } context.Entry(catalogue).State = EntityState.Modified; try { await context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CatalogueExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutBibliographicRecord(int id, BibliographicRecord bibliographicRecord) { if (id != bibliographicRecord.Id) { return(BadRequest()); } context.Entry(bibliographicRecord).State = EntityState.Modified; try { await context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!BibliographicRecordExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }