Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more

How do you gain access to database context?

Vote:
0

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:
0

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.