Please suggest which is the best approach for Fetching the Umbraco content in UmbracoAPIController
Hi @all,
I gone through the documentation of Umbraco services & helpers, and now iam little bit confused :(
I am creating an API controller (UmbracoAPI) for fetching the Umbraco content, so I need to find, what are the services available in Umbraco and what I understand is below are those services..
But which one I need to use and which is the best approach. In the documentation itself ,while using IUmbracoContextFactory there might be a chance for occurring circular dependency(and they suggested to use Lazy to resolve those issue) ,but again why there is three different services for the same functionality ,I'm confused :(
Please suggest which is the best approach for Fetching the Umbraco content in UmbracoAPIController
Hi @all,
I gone through the documentation of Umbraco services & helpers, and now iam little bit confused :(
I am creating an API controller (UmbracoAPI) for fetching the Umbraco content, so I need to find, what are the services available in Umbraco and what I understand is below are those services..
But which one I need to use and which is the best approach. In the documentation itself ,while using IUmbracoContextFactory there might be a chance for occurring circular dependency(and they suggested to use Lazy to resolve those issue) ,but again why there is three different services for the same functionality ,I'm confused :(
Can anyone please suggest me the best approach.
Regards Dev
I usually use the IContentService, but it depends what you want to do with the content.
Hi Huw Reddick,
Thanks for the reply.
But ContentService is good to used for the create/modify/delete operations right?, because it will hit in the DB right?
In my case, I just want to FETCH the Content using UmbracoAPIController.
Regards
If all you want is to read the data I would use IPublishedContentQuery
Thanks.
Do you know ,actually where we need to use these
is there any benefits ?, these are also hit in cache right? same as
is working on a reply...