예제 #1
0
        public void Remover(int id)
        {
            Entities.tb_benefits remover = db.tb_benefits.First(t => t.id_benefits == id);

            db.tb_benefits.Remove(remover);
            db.SaveChanges();
        }
예제 #2
0
        public void Alterar(Entities.tb_benefits benefits)
        {
            Entities.tb_benefits list = db.tb_benefits.First(t => t.id_benefits == benefits.id_benefits);

            list.bt_food       = list.bt_food;
            list.bt_lifeSafe   = list.bt_lifeSafe;
            list.bt_meal       = list.bt_meal;
            list.bt_planHealth = list.bt_planHealth;
            list.bt_transport  = list.bt_transport;
            list.bt_planDental = list.bt_planDental;

            db.SaveChanges();
        }
예제 #3
0
        public void Inserir(Entities.tb_benefits benefits)
        {
            db.tb_benefits.Add(benefits);

            db.SaveChanges();
        }