public async Task <IActionResult> PostMThrmsinterviewRoundsDefinition([FromBody] MThrmsinterviewRoundsDefinition mThrmsinterviewRoundsDefinition) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.MThrmsinterviewRoundsDefinition.Add(mThrmsinterviewRoundsDefinition); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMThrmsinterviewRoundsDefinition", new { id = mThrmsinterviewRoundsDefinition.MThrmsinterviewRoundsDefinitionId }, mThrmsinterviewRoundsDefinition)); }
public async Task <IActionResult> PutMThrmsinterviewRoundsDefinition([FromRoute] long id, [FromBody] MThrmsinterviewRoundsDefinition mThrmsinterviewRoundsDefinition) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != mThrmsinterviewRoundsDefinition.MThrmsinterviewRoundsDefinitionId) { return(BadRequest()); } _context.Entry(mThrmsinterviewRoundsDefinition).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MThrmsinterviewRoundsDefinitionExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }