Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

How do you gain access to database context?

Vote:
 

Lets say i want to display 10 most recent articles. I would ussually have service that gets the articles sorts pass in the view model etc. How can i do it with epi server? There are no entitites that refference table how is data even saved? How do you get the dbContext?

#260877
Aug 20, 2021 7:25
Vote:
 

You don't access content for the platform directly via the database. You load data either via injecting the IContentLoader/IContentRepository or if you're on the DXP the correct way of searching for datasets would be using Search & Navigation the cloud based elastic solution that Optimizely provides for indexing and searching content.

https://world.optimizely.com/documentation/developer-guides/CMS/Content/icontentrepository-and-datafactory/ 

https://world.optimizely.com/documentation/developer-guides/search-navigation/ 

#260878
Edited, Aug 20, 2021 8:31
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.