public virtual void Atualiza(T item) { using (var contexto = new BaseContexto()) { contexto.Entry(item).State = System.Data.Entity.EntityState.Modified; contexto.SaveChanges(); } }
public virtual void Excluir(T item) { using (var contexto = new BaseContexto()) { contexto.Entry <T>(item).State = EntityState.Deleted; contexto.SaveChanges(); } }