public Evento Atualizar(Evento model) { using (var db = new SistemaDeEventosContext()) { db.Entry(model).State = EntityState.Modified; db.Eventos.Include(x => x.IdCategoriaEventoNavigation).Include(x => x.IdEventoStatusNavigation).ToList(); db.SaveChanges(); return(model); } }
public bool delete(Participacao model) { using (var db = new SistemaDeEventosContext()) { db.Entry(model).State = EntityState.Deleted; db.SaveChanges(); return(true); } }
public Participacao update(Participacao model) { using (var db = new SistemaDeEventosContext()) { db.Entry(model).State = EntityState.Modified; db.SaveChanges(); return(model); } }
public CategoriaEvento update(CategoriaEvento model) { using (var db = new SistemaDeEventosContext()) { db.Entry(model).State = EntityState.Modified; db.SaveChanges(); return(model); } }
public T Atualizar(T modelo) { using (var db = new SistemaDeEventosContext()) { db.ChangeTracker.AutoDetectChangesEnabled = false; db.Entry(modelo).State = EntityState.Modified; db.SaveChanges(); return(modelo); } }