public async Task <IActionResult> PutEvento(int id, Evento evento) { if (id != evento.EventoId) { return(BadRequest()); } _context.Entry(evento).State = EntityState.Modified; try { await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!EventoExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
private EntityEntry <TEntity> NewMethod(TEntity model) { return(_context.Entry(model)); }