public void createBeneficiaries(string IDNum) { var BenefitiaryArepo = new ClientApplicationBeneficiaryRepository(); var benList = (from ben in BenefitiaryArepo.GetAll() where ben.IDNumber == IDNum select ben).ToList(); foreach (var ben in benList) { PolicyBeneficiary pb = new PolicyBeneficiary() { benIDNumber = ben.benIDNumber, IDNumber = ben.IDNumber, firstName = ben.firstName, lastName = ben.lastName, relationship = ben.relationship, age = ben.age }; using (var polBenRepo = new PolicyBeneficiaryRepository()) { polBenRepo.Insert(pb); } } }
public void Update(PolicyBeneficiary model) { _PolicyBeneficiaryRepository.Update(model); _datacontext.SaveChanges(); }
public void Archive(PolicyBeneficiary model) { _PolicyBeneficiaryRepository.Delete(model); _datacontext.SaveChanges(); }
public void Insert(PolicyBeneficiary model) { _PolicyBeneficiaryRepository.Insert(model); _datacontext.SaveChanges(); }