public HttpResponseMessage GetItemGroupListByID([FromBody] clsposItems request) { LoggerFactory.LoggerInstance.LogDebug("Request Started for : " + request.ItemID); HttpResponseMessage response = new HttpResponseMessage(); try { PosService objComService = new PosService(); var CustomerResponse = objComService.GetItemGroupListByID(request); if (CustomerResponse != null && CustomerResponse.ToString() != "") { response = Request.CreateResponse(HttpStatusCode.OK, CustomerResponse); LoggerFactory.LoggerInstance.LogDebug("Request Started for : " + request.ItemID); } else { response = Request.CreateErrorResponse(HttpStatusCode.NotFound, "No detail found for requested Customer by ID : " + request.ItemID + "."); } } catch (Exception ex) { LoggerFactory.LoggerInstance.LogException(ex); response = Request.CreateErrorResponse(HttpStatusCode.InternalServerError, "Error occured while getting Customer Detail by ID " + request.ItemID + "."); } return(response); }