public async Task <IActionResult> PutTurno(int id, Turno turno)
        {
            if (id != turno.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
示例#2
0
        public async Task <IActionResult> PutCursoPersona(int id, CursoPersona cursoPersona)
        {
            if (id != cursoPersona.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }