public IActionResult UpdateFamilyMemberToDatabase(FamilyMember familyMember) { FamilyMemberRepository repo = new FamilyMemberRepository(); repo.AssignAstroSign(familyMember); repo.AssignGeneration(familyMember); repo.UpdateFamilyMember(familyMember); repo.UpdateFamilyMember(familyMember); return(RedirectToAction("ViewFamilyMember", new { id = familyMember.ID })); }
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")); }