public async Task <IActionResult> PutWebContentType(int id, WebContentType webContentType) { if (id != webContentType.WebContentTypeId) { return(BadRequest()); } _context.Entry(webContentType).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!WebContentTypeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutDivision(int id, Division division) { if (id != division.DivisionID) { return(BadRequest()); } _context.Entry(division).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!DivisionExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
PutWebContent(int id, WebContent webContent) { if (id != webContent.WebContentId) { return(BadRequest()); } _context.Entry(webContent).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!WebContentExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }