public HttpResponseMessage GetFunctions() { try { IMetadataFactory _factory = MetadataFactory.GetInstance(); IMetadataManager _manager = _factory.GetManager(); var _metadata = _manager.GetAvailableOrganizationalFunctions(); return(Request.CreateResponse(HttpStatusCode.OK, _metadata)); } catch (Exception _ex) { var _message = string.Format("There was an error processing the request. {0}", _ex.Message); Log.Error("MetadataController.GetFunctions", "There was an error processing the request. Exception: {0}", _ex); HttpResponseMessage _response = Request.CreateResponse(HttpStatusCode.InternalServerError, _message); throw new HttpResponseException(_response); } }