public async Task <IActionResult> PutCarPostDataAutoTest(long id, CarPostDataAutoTest carPostDataAutoTest) { if (id != carPostDataAutoTest.Id) { return(BadRequest()); } _context.Entry(carPostDataAutoTest).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CarPostDataAutoTestExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <CarPostDataAutoTest> > PostCarPostDataAutoTest(CarPostDataAutoTest carPostDataAutoTest) { _context.CarPostDataAutoTest.Add(carPostDataAutoTest); await _context.SaveChangesAsync(); return(CreatedAtAction("GetCarPostDataAutoTest", new { id = carPostDataAutoTest.Id }, carPostDataAutoTest)); }