public async Task <IActionResult> PutParticipantInSchool(int id, ParticipantInSchool participantInSchool)
        {
            if (id != participantInSchool.SchoolParticipantId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutLocation(int id, Location location)
        {
            if (id != location.LocationId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Esempio n. 3
0
        public async Task <IActionResult> PutRole(int id, Role role)
        {
            if (id != role.RoleId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutTournamentGridType(int id, TournamentGridType tournamentGridType)
        {
            if (id != tournamentGridType.GridId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutJuryInPanel(int id, JuryInPanel juryInPanel)
        {
            if (id != juryInPanel.JuryInPanelId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }