Exemplo n.º 1
0
        public async Task <ActionResult <ReceptionI> > PostReceptionI(ReceptionI receptionI)
        {
            _context.receptionIs.Add(receptionI);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetReceptionI", new { id = receptionI.Id }, receptionI));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> PutReceptionI(int id, ReceptionI receptionI)
        {
            if (id != receptionI.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }