Exemple #1
0
        /// <summary>
        ///     Asks the service to retrieve all echos.
        /// </summary>
        /// <returns>
        ///     HTTP Status Code 200 - OK + JSON encoded data payload on success,
        ///     HTTP Status Code 404 - Not Found if no data was retrieved,
        ///     HTTP Status Code 500 - Internal Server Error if the other codes don't apply. Contains exception on DEBUG.
        /// </returns>
        public IHttpActionResult Get()
        {
            var result = _echoService.GetAll();

            if (result.ActionStatus.Status == ActionStatusEnum.Success)
            {
                return(GetHttpActionResult(result.ActionDataSet));
            }

            return(HandleErrorActionResult(result));
        }