示例#1
0
        public async Task <IActionResult> PutPiecesJointesEvTzo(int id, PiecesJointesEvTzo piecesJointesEvTzo)
        {
            if (id != piecesJointesEvTzo.Id)
            {
                return(BadRequest());
            }

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

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

            return(NoContent());
        }
示例#2
0
        public async Task <ActionResult <PiecesJointesEvTzo> > PostPiecesJointesEvTzo(PiecesJointesEvTzo piecesJointesEvTzo)
        {
            _context.piecesJointesEvTzos.Add(piecesJointesEvTzo);
            await _context.SaveChangesAsync();

            return(CreatedAtAction("GetPiecesJointesEvTzo", new { id = piecesJointesEvTzo.Id }, piecesJointesEvTzo));
        }