This the home club object we use to populate the SQL database with a UpSert(object) or UpSertAll(objects) command.
See for all the commands: SQLite-Doc
In the demo there is also a guest club object.
public static Club SetObjectHomeClub()
{
return new Club
{
IdC = 11,
NameClub = “Home Club 1”,
Teams = new List<Team> {
new Team {
IdT=21,
NameTeam = “Team HC 10-1”,
TeamPlayers = new List<TeamPlayer>
{
new TeamPlayer {
IdTP=31,
NamePlayer = “John”,
Matches = new List<Match> {
new Match {
IdM = 51,
NameMatch = “FirstMatch Home 51”,
MatchSets = new List<MatchSet> {
new MatchSet {
IdMS = 61,
NameMatchSet = “FirstSet 61”
},
new MatchSet {
IdMS = 62,
NameMatchSet = “SecondSet 62”
}
}
},
new Match {
IdM = 52,
NameMatch = “SecondMatch Home 52”,
MatchSets = new List<MatchSet> {
new MatchSet {
IdMS = 63,
NameMatchSet = “FirstSet 63”
},
new MatchSet {
IdMS = 64,
NameMatchSet = “SecondSet 64”
}
}
}
},
Notes = new List<Note> {
new Note {
IdN = 83,
NoteText = “Available on Saturday”
},
new Note {
IdN = 84,
NoteText = “Only Before 15:00”
}
}
},
new TeamPlayer {
IdTP=32,
NamePlayer = “Michael”,
Matches = new List<Match> {
new Match {
IdM = 51,
NameMatch = “FirstMatch Home 51”,
MatchSets = new List<MatchSet> {
new MatchSet {
IdMS = 61,
NameMatchSet = “FirstSet 61”
},
new MatchSet {
IdMS = 62,
NameMatchSet = “SecondSet 62”
}
}
},
new Match {
IdM = 52,
NameMatch = “SecondMatch Home52”,
MatchSets = new List<MatchSet> {
new MatchSet {
IdMS = 63,
NameMatchSet = “FirstSet 63”
},
new MatchSet {
IdMS = 64,
NameMatchSet = “SecondSet 64”
}
}
}
},
}
},
TeamMatches = new List<TeamMatch>
{
new TeamMatch {
IdTM = 41,
NameTeamMatch = “TeamMatch 41”,
Matches = new List<Match> {
new Match {
IdM = 51,
NameMatch = “First Match 51”,
MatchSets = new List<MatchSet> {
new MatchSet {
IdMS = 61,
NameMatchSet = “First Set 61”
},
new MatchSet {
IdMS = 62,
NameMatchSet = “Second Set 62”
},
},
},
new Match {
IdM = 52,
NameMatch = “Second Match 52”,
MatchSets = new List<MatchSet> {
new MatchSet {
IdMS = 63,
NameMatchSet = “First Set 63”
},
new MatchSet {
IdMS = 64,
NameMatchSet = “Second Set 64”
},
},
},
},
}
},
TeamComs = new List<TeamCom> {
new TeamCom {
IdTC = 71,
NameTeamCom = “TeamCom 71”},
new TeamCom {
IdTC = 72,
NameTeamCom = “TeamCom 72”}
},
Notes=new List<Note> {
new Note {
IdN =81,
NoteText = “Team HC 10-1 not on Saturdays after 18:00”
},
new Note {
IdN = 82,
NoteText = “Team HC 10-1 Incomplete on All Saturdays”
},
}
},
new Team {
IdT = 22,
NameTeam = “Team HC 10-2”,
TeamPlayers = new List<TeamPlayer>
{
new TeamPlayer {
IdTP = 33,
NamePlayer = “Camila”,
Matches = new List<Match> {
new Match {
IdM = 53,
NameMatch = “FirstMatch Home 53”,
MatchSets = new List<MatchSet> {
new MatchSet {
IdMS = 65,
NameMatchSet = “FirstSet 65”
},
new MatchSet {
IdMS = 66,
NameMatchSet = “SecondSet 66”
}
}
},
new Match {
IdM = 54,
NameMatch = “SecondMatch Home 54”,
MatchSets = new List<MatchSet> {
new MatchSet {
IdMS = 67,
NameMatchSet = “FirstSet 67”
},
new MatchSet {
IdMS = 68,
NameMatchSet = “SecondSet 68”
}
}
}
},
Notes = new List<Note> {
new Note {
IdN = 88,
NoteText = “Available on Saturday”
},
new Note {
IdN = 89,
NoteText=”Only Before 15:00″
}
}
},
new TeamPlayer {
IdTP = 34,
NamePlayer = “Lucy”,
Matches = new List<Match> {
new Match {
IdM = 53,
NameMatch = “FirstMatch Home 53”,
MatchSets = new List<MatchSet> {
new MatchSet {
IdMS = 65,
NameMatchSet = “FirstSet 65”
},
new MatchSet {
IdMS = 66,
NameMatchSet = “SecondSet 66”
}
}
},
new Match {
IdM = 54,
NameMatch = “SecondMatch Home 54”,
MatchSets = new List<MatchSet> {
new MatchSet {
IdMS = 67,
NameMatchSet = “FirstSet 67”
},
new MatchSet {
IdMS = 68,
NameMatchSet = “SecondSet 68”
}
}
}
},
}
},
TeamMatches = new List<TeamMatch>
{
new TeamMatch {
IdTM = 42,
NameTeamMatch = “TeamMatch 42”,
Matches = new List<Match> {
new Match {
IdM = 53,
NameMatch = “First Match 53”,
MatchSets = new List<MatchSet> {
new MatchSet {
IdMS = 65,
NameMatchSet = “First Set 65”
},
new MatchSet {
IdMS = 66,
NameMatchSet = “Second Set 66”
},
},
},
new Match {
IdM = 54,
NameMatch = “Second Match 54”,
MatchSets = new List<MatchSet> {
new MatchSet {
IdMS = 63,
NameMatchSet = “First Set 67”
},
new MatchSet {
IdMS = 64,
NameMatchSet = “Second Set 68”
},
},
},
},
}
},
TeamComs = new List<TeamCom> {
new TeamCom {
IdTC = 71,
NameTeamCom = “TeamCom 71”},
new TeamCom {
IdTC = 72,
NameTeamCom = “TeamCom 72”}
},
Notes=new List<Note> {
new Note {
IdN = 85,
NoteText = “Team HC 10-2 not on Saturdays after 18:00”
},
new Note {
IdN = 86,
NoteText =” Team HC 10-2Incomplete on All Saturdays”
},
}
},
}
};
}
\l …. ….. ….