public async Task <IActionResult> PutMstCrmQuote([FromRoute] int id, [FromBody] MstCrmQuote mstCrmQuote) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != mstCrmQuote.QuoteId) { return(BadRequest()); } _context.Entry(mstCrmQuote).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MstCrmQuoteExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <IActionResult> PostMstCrmQuote([FromBody] MstCrmQuote mstCrmQuote) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } _context.MstCrmQuote.Add(mstCrmQuote); await _context.SaveChangesAsync(); return(CreatedAtAction("GetMstCrmQuote", new { id = mstCrmQuote.QuoteId }, mstCrmQuote)); }