public HttpResponseMessage Getsodetails(int OrderID) { try { var Department = _SalesOrderService.GetSalesOrderDetails(OrderID); return(Request.CreateResponse(HttpStatusCode.OK, Department)); } catch (Exception ex) { throw new ApiDataException(1000, "Department Not Found", HttpStatusCode.NotFound); } }