public async Task <string> CreateRound( string tournamentId, RoundType type, bool freeform = false ) { using (var command = connectionProvider.CreateCommand(@" INSERT INTO Round (id, tournamentId, type, freeform) VALUES (@id, @tournamentId, @type, @freeform) ")) { string id = Guid.NewGuid().ToString(); command.AddParameter("@id", id); command.AddParameter("@tournamentId", tournamentId); command.AddParameter("@type", type.ToString().ToLower()); command.AddParameter("@freeform", freeform); await command.ExecuteNonQueryAsync(); return(id); } }
public static string GetRoundTypeName(RoundType RoundType) { return(RoundType.ToString().ToUpper().Replace("PICK", "PICK ")); }