Service APIs
Accessing the Umbraco services
Access via a Controller
public class CustomController
{
private readonly IContentService _contentService;
public ContentController(IContentService contentService)
{
_contentService = contentService;
}
public ActionResult PerformAction()
{
var someContent = _contentService.GetById(1234);
}
}Access via a Razor View Template
Access in a Custom Class via dependency injection
Custom Class example
Services available
More information
Last updated
Was this helpful?