A lot of refactoring and both saving types work

This commit is contained in:
2020-04-16 00:12:42 +02:00
parent 1361fa048e
commit 7f4bf45850
6 changed files with 128 additions and 37 deletions

View File

@ -96,6 +96,8 @@ namespace TrackerLibrary.DataAccess
SaveTournamentEntries(model, connection);
SaveTournamentRounds(model, connection);
TournamentLogic.UpdateTournamentResults(model);
}
}
@ -233,6 +235,7 @@ namespace TrackerLibrary.DataAccess
foreach (TournamentModel t in output)
{
// Populate prizes
p = new DynamicParameters();
p.Add("@TournamentId", t.Id);
t.Prizes = connection.Query<PrizeModel>("dbo.spPrizes_GetByTournament", p, commandType: CommandType.StoredProcedure).ToList();
// Populate Teams