示例#1
0
        public string GetAllQuizByGameId(string gameId)
        {
            QuizRepository    repository = new QuizRepository();
            List <QuizEntity> quiz       = repository.GetAllFromGame(gameId);

            string json;

            json = JsonConvert.SerializeObject(
                quiz,
                Formatting.Indented,
                new JsonSerializerSettings {
                ContractResolver = new CamelCasePropertyNamesContractResolver()
            });

            return(json);
        }