public async Task <IActionResult> PutAnswerMaster(int id, AnswerMaster answerMaster) { if (id != answerMaster.Id) { return(BadRequest()); } _context.Entry(answerMaster).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!AnswerMasterExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutQuestionType(int id, QuestionType questionType) { if (id != questionType.Id) { return(BadRequest()); } _context.Entry(questionType).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!QuestionTypeExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutTestQuestionMapping(int id, TestQuestionMapping testQuestionMapping) { if (id != testQuestionMapping.Id) { return(BadRequest()); } _context.Entry(testQuestionMapping).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TestQuestionMappingExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PutRegistration(int id, Registration registration) { if (id != registration.Id) { return(BadRequest()); } _context.Entry(registration).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!RegistrationExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }