Beispiel #1
0
        public static EndpointResponse SuccessResponse(DataTable dt)
        {
            var res = new EndpointResponse();

            res.StatusCode   = HttpStatusCode.OK;
            res.ErrorDetails = null;
            res.TableResult  = dt;

            return(res);
        }
Beispiel #2
0
        public static EndpointResponse ErrorResponse(Exception ex)
        {
            var res = new EndpointResponse();

            res.StatusCode   = HttpStatusCode.InternalServerError;
            res.ErrorDetails = ex.ToString();
            res.TableResult  = null;

            return(res);
        }