// GET: api/Integrations public IEnumerable <IntegrationInfoModel> GetIntegrations() { BLIntegration blIntegration = new BLIntegration(); BLResponse <List <IntegrationInfoModel> > integrationInfoResponse = blIntegration.GetAllIntegrationInfo(); return(integrationInfoResponse.ResponseData); }
// GET: api/Integrations/harunk public HttpResponseMessage GetIntegration(string name, string exportType) { BLIntegration blIntegration = new BLIntegration(); BLResponse <IntegrationModel> integrationResponse = blIntegration.GetIntegration(name, exportType); if (integrationResponse.ResponseCode == ResponseCode.Fail) { return(new HttpResponseMessage { Content = new StringContent(integrationResponse.ResponseMessage), StatusCode = HttpStatusCode.BadRequest }); } return(new HttpResponseMessage { Content = new StringContent(integrationResponse.ResponseData.Content, Encoding.UTF8, "application/xml"), StatusCode = HttpStatusCode.OK }); }