Esempio n. 1
0
        public async Task <IActionResult> PutBono(int id, Bono bono)
        {
            if (id != bono.BonoId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutPermisos(int id, Permisos permisos)
        {
            if (id != permisos.PermisoId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutDeduccion(int id, Deduccion deduccion)
        {
            if (id != deduccion.DeduccionId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }