public async Task <IActionResult> PutWell(int id, Well well) { if (id != well.Id) { return(BadRequest()); } _context.Entry(well).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!WellExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutPlatform(int id, Platform platform) { if (id != platform.Id) { return(BadRequest()); } _context.Entry(platform).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!PlatformExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }