public async Task <IActionResult> PutMThrmscompany([FromRoute] long id, [FromBody] MThrmscompany mThrmscompany) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != mThrmscompany.MThrmscompanyId) { return(BadRequest()); } _context.Entry(mThrmscompany).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MThrmscompanyExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostMThrmscompany([FromBody] MThrmscompany mThrmscompany) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.MThrmscompany.Add(mThrmscompany); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMThrmscompany", new { id = mThrmscompany.MThrmscompanyId }, mThrmscompany)); }