public async Task <IActionResult> PutAtelier_department(int id, Atelier_department atelier_department) { if (id != atelier_department.Id) { return(BadRequest()); } _context.Entry(atelier_department).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!Atelier_departmentExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <Atelier_department> > PostAtelier_department(Atelier_department atelier_department) { _context.Atelier_Departments.Add(atelier_department); await _context.SaveChangesAsync(); return(CreatedAtAction("GetAtelier_department", new { id = atelier_department.Id }, atelier_department)); }