public HttpResponseMessage GetSystemRoleList() { HttpResponseMessage response = null; try { List <RoleModel> rolelist = RoleRepo.GetSystemRoleList(); response = Request.CreateResponse(HttpStatusCode.OK, new EMSResponseMessage("EMS_001", "Success", rolelist)); } catch (Exception exception) { Debug.WriteLine(exception.Message); Debug.WriteLine(exception.GetBaseException()); response = Request.CreateResponse(HttpStatusCode.OK, new EMSResponseMessage("EMS_101", "Application Error", exception.Message)); } return(response); }