public async Task <ActionResult <FilesProjet> > PostFilesProjet(FilesProjet filesProjet) { _context.filesProjets.Add(filesProjet); await _context.SaveChangesAsync(); return(CreatedAtAction("GetFilesProjet", new { id = filesProjet.Id }, filesProjet)); }
public async Task <IActionResult> PutFilesProjet(int id, FilesProjet filesProjet) { if (id != filesProjet.Id) { return(BadRequest()); } _context.Entry(filesProjet).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FilesProjetExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }