// GET /api/packschedules/5 public PackScheduleDetails Get(string id) { int psNum; if (int.TryParse(id, out psNum)) { return(FindPackScheduleByOldPackScheduleNumber(psNum)); } var getPackScheduleSummaryResult = _productionService.GetPackSchedule(id); getPackScheduleSummaryResult.EnsureSuccessWithHttpResponseException(); return(getPackScheduleSummaryResult.ResultingObject.Map().To <PackScheduleDetails>()); }