public async Task <ActionResult <CitationRecords> > PostCitationRecords(CitationRecords citationRecords) { _context.CitationRecords.Add(citationRecords); await _context.SaveChangesAsync(); return(CreatedAtAction("GetCitationRecords", new { id = citationRecords.Id }, citationRecords)); }
public async Task <IActionResult> PutCitationRecords(Guid id, CitationRecords citationRecords) { if (id != citationRecords.Id) { return(BadRequest()); } _context.Entry(citationRecords).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CitationRecordsExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }