public async Task <IActionResult> PutMThrmsofferLetter([FromRoute] long id, [FromBody] MThrmsofferLetter mThrmsofferLetter) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != mThrmsofferLetter.MThrmsofferLetterId) { return(BadRequest()); } _context.Entry(mThrmsofferLetter).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MThrmsofferLetterExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostMThrmsofferLetter([FromBody] MThrmsofferLetter mThrmsofferLetter) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.MThrmsofferLetter.Add(mThrmsofferLetter); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMThrmsofferLetter", new { id = mThrmsofferLetter.MThrmsofferLetterId }, mThrmsofferLetter)); }