Consuming data from an external Web API service

David Pearson asked on June 22, 2016 14:35

I have a repository class in the App_Code directory. The Repository Class makes a Web API 2 call to an external service that returns dealer locator data in a List of Dealers.

Is there a how to somewhere that will explain to me how to wire that repository class up to Kentico where a Kentico repeater can display that data?

Thanks David

Correct Answer

Dawid Jachnik answered on June 22, 2016 14:44

Hello,

You can create your custom data source web part (https://docs.kentico.com/display/K9/Developing+data+source+web+parts) and use it in Portal engine. Or assing the List directly to repeater.DataSource parameter adn the Bind it.

You class attributes will be accesibble in the transfromation just by the names

<%# Eval("YourClassAttributeName") %>
0 votesVote for this answer Unmark Correct answer

Recent Answers


David te Kloese answered on June 22, 2016 14:37

What is your question exactly?

0 votesVote for this answer Mark as a Correct answer

David Pearson answered on June 22, 2016 14:41

Is there a how to somewhere that will explain to me how to wire that repository class up to Kentico where a Kentico repeater can display that data?

0 votesVote for this answer Mark as a Correct answer

David Pearson answered on June 23, 2016 15:12

Thanks just did the example, looks easy to implement...

David

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.