コード例 #1
0
        public HttpResponseMessage GetRover(string id)
        {
            var rover = _roverService.GetRover(id);

            if (rover == null)
            {
                return(Request.CreateResponse(HttpStatusCode.NotFound, $"Could not Locate RoverId: {id},Please Create/Update a Rover!"));
            }


            return(Request.CreateResponse(HttpStatusCode.OK, $"Located RoverId: {id} at :({rover.CurrentX},{rover.CurrentY}) {rover.CurrentDirection}"));
        }