public IActionResult Index() { FamilyMemberRepository repo = new FamilyMemberRepository(); List <FamilyMember> allFamilyMembers = repo.GetAllFamilyMembers(); var groupRepo = new GroupNameRepository(); return(View(allFamilyMembers)); }
public IActionResult InsertFamilyMemberToDatabase(FamilyMember familyMemberToInsert) { FamilyMemberRepository repo = new FamilyMemberRepository(); repo.AssignAstroSign(familyMemberToInsert); repo.AssignGeneration(familyMemberToInsert); repo.InsertFamilyMember(familyMemberToInsert); var groupRepo = new GroupNameRepository(); groupRepo.AssignGroupNameToFamilyMember(familyMemberToInsert); groupRepo.AssignAstroSignToFamilyMember(familyMemberToInsert); //var fam = repo.AssignGroups(); return(RedirectToAction("Index")); }