public async Task <ActionResult <FinishedFormat> > PostFinishedFormat(FinishedFormat finishedFormat) { _context.finishedFormat.Add(finishedFormat); await _context.SaveChangesAsync(); return(CreatedAtAction("GetFinishedFormat", new { id = finishedFormat.FinishedFormatId }, finishedFormat)); }
public async Task <IActionResult> PutFinishedFormat(int id, FinishedFormat finishedFormat) { if (id != finishedFormat.FinishedFormatId) { return(BadRequest()); } _context.Entry(finishedFormat).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FinishedFormatExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }