public async Task <ActionResult <FastaSection> > PostFastaSection(FastaSection fastaSection) { _context.FastaSections.Add(fastaSection); await _context.SaveChangesAsync(); return(CreatedAtAction("GetFastaSection", new { id = fastaSection.FastaSectionId }, fastaSection)); }
public async Task <IActionResult> PutFastaSection(int id, FastaSection fastaSection) { if (id != fastaSection.FastaSectionId) { return(BadRequest()); } _context.Entry(fastaSection).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FastaSectionExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }