Esempio n. 1
0
        public async Task <IActionResult> PutUtilisateur(int id, Utilisateur utilisateur)
        {
            if (id != utilisateur.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutListe_SuperVilain_Mission(int id, Liste_SuperVilain_Mission liste_SuperVilain_Mission)
        {
            if (id != liste_SuperVilain_Mission.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutMembre(int id, Membre membre)
        {
            if (id != membre.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Esempio n. 4
0
        public async Task <IActionResult> PutSatisfaction(int id, Satisfaction satisfaction)
        {
            if (id != satisfaction.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Esempio n. 5
0
        public async Task <IActionResult> PutPrivileges(int id, Privileges privileges)
        {
            if (id != privileges.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }