public async Task <IActionResult> PutRolCalificacion(int id, RolCalificacion rolCalificacion)
        {
            if (id != rolCalificacion.RolId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutRepresentante(int id, Representante representante)
        {
            if (id != representante.RepresentanteId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutActividadTipo(int id, ActividadTipo actividadTipo)
        {
            if (id != actividadTipo.ActividadTipoId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Ejemplo n.º 4
0
        public async Task <IActionResult> PutEntidad(int id, Entidad entidad)
        {
            if (id != entidad.EntidadId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }