public async Task <IActionResult> PutTarjetaPresentacion(int id, TarjetaPresentacion tarjetaPresentacion) { if (id != tarjetaPresentacion.IdTarjeta) { return(BadRequest()); } _context.Entry(tarjetaPresentacion).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!TarjetaPresentacionExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
public async Task <ActionResult <TarjetaPresentacion> > PostTarjetaPresentacion(TarjetaPresentacion tarjetaPresentacion) { _context.TarjetaPresentacion.Add(tarjetaPresentacion); await _context.SaveChangesAsync(); return(CreatedAtAction("GetTarjetaPresentacion", new { id = tarjetaPresentacion.IdTarjeta }, tarjetaPresentacion)); }