public async Task <IActionResult> PutLanguage(int id, Language language) { if (id != language.Id) { return(BadRequest()); } _context.Entry(language).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!LanguageExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutClass(int id, Class @class) { if (id != @class.Id) { return(BadRequest()); } _context.Entry(@class).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ClassExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutFunctionArgument(int id, FunctionArgument functionArgument) { if (id != functionArgument.Id) { return(BadRequest()); } _context.Entry(functionArgument).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!FunctionArgumentExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }