We have articles that are published on pages. For one article we want to call the Entity from the broker database (on cd server). It is not DCP? I dn't know.
Code from MVC Controller (it's a REST API thats called from frontend).
var localization = new Sdl.Web.Common.Configuration.Localization()
{
Language = "Nederlands",
Id = "102", // publication id of the website
};
var provider = new Sdl.Web.Tridion.Mapping.GraphQLContentProvider();
// Use the Component tcm - component template tcm
EntityModel entityModel = provider.GetEntityModel("418926-418875", localization);
this results in Exception:
{"Item '418926-418875' not found"}
at Sdl.Web.Tridion.Mapping.DefaultContentProvider.LoadEntityModel(String id, Localization localization)\r\n
at Sdl.Web.Tridion.Mapping.DefaultContentProvider.<>c__DisplayClass3_1.b__0()\r\n
at Sdl.Web.Tridion.Caching.CacheProvider.CreateCacheValue[T](UInt32 hash, String key, String region, Func1 addFunction, IEnumerable
1 dependencies)\r\n
at Sdl.Web.Tridion.Caching.CacheProvider.GetOrAdd[T](String key, String region, Func1 addFunction, IEnumerable
1 dependencies)\r\n
at Sdl.Web.Tridion.Mapping.DefaultContentProvider.GetEntityModel(String id, Localization localization)\r\n
at Uwv.eDv.Web.Modules.Core.Controllers.CustomOverzichtApiController.Post(OverzichtInput input)
in D:\..\Controllers\CustomOverzichtApiController.cs:line 60"
Questions.
- Is this DCP? If not how can be get it's information without being DCP.
- Is there other way to get Entitymodel from broker database. Sample?