public async Task <IActionResult> PutPSDriveInfo([FromRoute] int id, [FromBody] PSDrive pSDriveInfo) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != pSDriveInfo.Id) { return(BadRequest()); } _context.Entry(pSDriveInfo).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PSDriveInfoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutLogicalDisk([FromRoute] int id, [FromBody] LogicalDisk logicalDisk) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != logicalDisk.Id) { return(BadRequest()); } _context.Entry(logicalDisk).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LogicalDiskExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }