Exemplo n.º 1
0
        public async Task <IActionResult> PutSkier(int id, Skier skier)
        {
            if (id != skier.fis_code)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
        public async Task <IActionResult> PutWinterSeason(int id, WinterSeason winterSeason)
        {
            if (id != winterSeason.id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Exemplo n.º 3
0
        public async Task <IActionResult> PutResult(int id, Result result)
        {
            if (id != result.result_id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }