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(); }
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(); }
public void Inserir(Entities.tb_benefits benefits) { db.tb_benefits.Add(benefits); db.SaveChanges(); }