public async Task <ActionResult <FilesOrg> > PostFilesOrg(FilesOrg filesOrg) { _context.filesOrgs.Add(filesOrg); await _context.SaveChangesAsync(); return(CreatedAtAction("GetFilesOrg", new { id = filesOrg.Id }, filesOrg)); }
public async Task <IActionResult> PutFilesOrg(int id, FilesOrg filesOrg) { if (id != filesOrg.Id) { return(BadRequest()); } _context.Entry(filesOrg).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FilesOrgExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }