Textfile save all tournament but captureRounds information

This commit is contained in:
2020-04-10 00:15:27 +02:00
parent a3096138f9
commit dee234408d
3 changed files with 177 additions and 2 deletions

View File

@ -13,6 +13,9 @@ namespace TrackerLibrary.DataAccess
private const string PeopleFile = "PersonModels.csv";
private const string TeamFile = "TeamModels.csv";
private const string TournamentFile = "TournamentModels.csv";
private const string MatchupFile = "MatchupModels.csv";
private const string MatchupEntryFile = "MatchupEntryModels.csv";
public PersonModel CreatePerson(PersonModel model)
@ -113,6 +116,9 @@ namespace TrackerLibrary.DataAccess
currentId = tournaments.OrderByDescending(x => x.Id).First().Id + 1;
}
model.Id = currentId;
model.SaveRoundsToFile( MatchupFile, MatchupEntryFile);
tournaments.Add(model);
tournaments.SaveToTournamentFile(TournamentFile);