Esempio n. 1
0
        public async Task <IActionResult> PostMThrmsinterviewScheduleRounds([FromBody] MThrmsinterviewScheduleRounds mThrmsinterviewScheduleRounds)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _context.MThrmsinterviewScheduleRounds.Add(mThrmsinterviewScheduleRounds);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetMThrmsinterviewScheduleRounds", new { id = mThrmsinterviewScheduleRounds.MThrmsinterviewScheduleRoundsId }, mThrmsinterviewScheduleRounds));
        }
Esempio n. 2
0
        public async Task <IActionResult> PutMThrmsinterviewScheduleRounds([FromRoute] long id, [FromBody] MThrmsinterviewScheduleRounds mThrmsinterviewScheduleRounds)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != mThrmsinterviewScheduleRounds.MThrmsinterviewScheduleRoundsId)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }