Example #1
0
        public ActionResult ListLeaderBoard()
        {
            var response = _leaderBoardService.SelectAll();

            if (response.StatusCode == HttpStatusCode.NoContent)
            {
                return(StatusCode((int)response.StatusCode));
            }
            return(StatusCode((int)response.StatusCode, response));
        }
Example #2
0
        public ActionResult ListLeaderBoard()
        {
            var response = _leaderBoardService.SelectAll();

            if (response.StatusCode == HttpStatusCode.NoContent)
            {
                return(StatusCode((int)response.StatusCode));
                // return NoContent();
            }
            return(StatusCode((int)response.StatusCode, response));
            // Another option would be:
            // return Ok(response.data);
            // My question is why you choosed to create different class?
        }