Exemplo n.º 1
0
        private dynamic GetPlayerStats(dynamic parameters)
        {
            string playerName    = parameters.name;
            var    isNullOrEmpty = DbProcessor.GetAllScores()
                                   .Where(s => s.Name.Equals(playerName, StringComparison.OrdinalIgnoreCase))
                                   .IsNullOrEmpty();

            if (isNullOrEmpty)
            {
                return(HttpStatusCode.NotFound);
            }
            return(Response.AsJson(DbProcessor.GetPlayerStats(playerName)));
        }