Beispiel #1
0
        public async Task <IActionResult> PutPushToken(int id, PushToken pushToken)
        {
            if (id != pushToken.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Beispiel #2
0
        public async Task <IActionResult> PutLiveGame(int id, LiveGame liveGame)
        {
            if (id != liveGame.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
Beispiel #3
0
        public async Task <IActionResult> PutTeam(int id, Team team)
        {
            if (id != team.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }