public async Task <ActionResult <FilesEtatCompte> > PostFilesEtatCompte(FilesEtatCompte filesEtatCompte) { _context.filesEtatComptes.Add(filesEtatCompte); await _context.SaveChangesAsync(); return(CreatedAtAction("GetFilesEtatCompte", new { id = filesEtatCompte.Id }, filesEtatCompte)); }
public async Task <IActionResult> PutFilesEtatCompte(int id, FilesEtatCompte filesEtatCompte) { if (id != filesEtatCompte.Id) { return(BadRequest()); } _context.Entry(filesEtatCompte).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FilesEtatCompteExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }