Exemplo n.º 1
0
        public async Task <ActionResult <Careerinformation> > PostCareerinformation(Careerinformation careerinformation)
        {
            _context.Careerinformations.Add(careerinformation);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetCareerinformation", new { id = careerinformation.ID }, careerinformation));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> PutCareerinformation(int id, Careerinformation careerinformation)
        {
            if (id != careerinformation.ID)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }