예제 #1
0
        public async Task <IActionResult> PutVille(int id, Ville ville)
        {
            if (id != ville.VilleId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutDetailArchitectural(int id, DetailArchitectural detailArchitectural)
        {
            if (id != detailArchitectural.DetailId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }