Exemple #1
0
        private static Response GetTrip(dynamic parameters)
        {
            Response response;
            var      trip = TripBl.GetTripWithMessages((int)parameters.tripId);

            if (null == trip)
            {
                response            = string.Empty;
                response.StatusCode = HttpStatusCode.NotFound;
            }
            else
            {
                response             = JsonConvert.SerializeObject(trip);
                response.ContentType = "application/json";
                response.StatusCode  = HttpStatusCode.OK;
            }
            return(response);
        }