public async Task <ActionResult <Referenciel> > PostReferenciel(Referenciel referenciel) { _context.Referenciel.Add(referenciel); await _context.SaveChangesAsync(); return(CreatedAtAction("GetReferenciel", new { id = referenciel.Id }, referenciel)); }
public async Task <IActionResult> PutReferenciel(int id, Referenciel referenciel) { if (id != referenciel.Id) { return(BadRequest()); } _context.Entry(referenciel).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ReferencielExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }