public async Task <IActionResult> PutSimtest(int id, UpdateTestModel model)
        {
            if (id != model.TestId)
            {
                return(BadRequest());
            }
            // map model to entity
            var simtest = _mapper.Map <Simtest>(model);

            _context.Entry(simtest).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!SimtestExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> PutAssignedtesttable(int id, Assignedtesttable assignedtesttable)
        {
            if (id != assignedtesttable.AssignedTestId)
            {
                return(BadRequest());
            }

            _context.Entry(assignedtesttable).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!AssignedtesttableExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }