예제 #1
0
        public async Task <IActionResult> PutNextone(int id, Nextone nextone)
        {
            if (id != nextone.NextoneId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
예제 #2
0
        public async Task <IActionResult> PutMission(int id, Mission mission)
        {
            if (id != mission.MissionId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }