this is my db: tblGroups: GroupID GroupName
tblMembersInGroup GroupID MemberID Rank
tblMembers MemberID Name
this is my Model:
class group
{
int groupid
string name
List<EnlistedMembers> myMembers;
}
class EnlistedMebmers
{
Member myMember;
int Rank;
}
class Member
{
int MemberID
string Name
}
I am not sure how to map this in FNH, as the Members class has no object that tells FNH who is the father.
I think the group mapping is obvious:
Table(tblGroup);
Id(x => x.groupid, "GroupID').GeneratedBy.Identity();
Map(x => x.name, "GroupName");
HasMany(x => x.myMembers).AsList().Inverse().Cascade.All();
What's next ?
how do I map enlistedmembers, with no identity object? and no group object ? but with the extra rank data. the db has all the data, I need a way to create the classes right...
Thanks,
Dani