public static List <Account> GetTournamentUsers(int tournamentId)
        {
            var apiCalltask = ApiTournament.GetTournamentUsers(tournamentId);
            var result      = apiCalltask.Result;

            JArray         jsonResponse = JsonConvert.DeserializeObject <JArray>(result);
            List <Account> userList     = JsonConvert.DeserializeObject <List <Account> >(jsonResponse.ToString());

            return(userList);
        }
        public static Tournament GetDetails(int id)
        {
            var apiCallTask = ApiTournament.Get(id);
            var result      = apiCallTask.Result;

            JObject    jsonResponse = JsonConvert.DeserializeObject <JObject>(result);
            Tournament tournament   = JsonConvert.DeserializeObject <Tournament>(jsonResponse.ToString());

            return(tournament);
        }
        // public virtual ICollection<User> Moderators { get; set; }
        // public virtual Bracket Bracket { get; set; }
        // public string Standings { get; set; }

        public static List <Tournament> GetTournaments()
        {
            var apiCalltask = ApiTournament.GetAll();
            var result      = apiCalltask.Result;

            JArray            jsonResponse   = JsonConvert.DeserializeObject <JArray>(result);
            List <Tournament> tournamentList = JsonConvert.DeserializeObject <List <Tournament> >(jsonResponse.ToString());

            return(tournamentList);
        }
 public static void Delete(int id)
 {
     var apiCallTask = ApiTournament.Delete(id);
 }
 public static void Put(int id, Tournament tournament)
 {
     string jsonTournament = JsonConvert.SerializeObject(tournament);
     var    apiCallTask    = ApiTournament.Put(id, jsonTournament);
 }
 public static void Post(Tournament tournament)
 {
     string jsonTournament = JsonConvert.SerializeObject(tournament);
     var    apiCallTask    = ApiTournament.Post(jsonTournament);
 }