Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        public async Task <ActionResult <CarPostDataAutoTest> > PostCarPostDataAutoTest(CarPostDataAutoTest carPostDataAutoTest)
        {
            _context.CarPostDataAutoTest.Add(carPostDataAutoTest);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetCarPostDataAutoTest", new { id = carPostDataAutoTest.Id }, carPostDataAutoTest));
        }