public Task <PageDetails> AsDetailsAsync() { var query = new GetPageDetailsByIdQuery(_pageId); return(ExtendableContentRepository.ExecuteQueryAsync(query)); }
/// <summary> /// Returns detailed information on a page and it's latest version. This /// query is primarily used in the admin area because it is not version-specific /// and the PageDetails projection includes audit data and other additional /// information that should normally be hidden from a customer facing app. /// </summary> /// <param name="pageId">Database id of the page to get.</param> /// <param name="executionContext">Optional execution context to use when executing the query. Useful if you need to temporarily elevate your permission level.</param> public Task <PageDetails> GetPageDetailsByIdAsync(int pageId, IExecutionContext executionContext = null) { var query = new GetPageDetailsByIdQuery(pageId); return(_queryExecutor.ExecuteAsync(query, executionContext)); }
public IContentRepositoryQueryContext <PageDetails> AsDetails() { var query = new GetPageDetailsByIdQuery(_pageId); return(ContentRepositoryQueryContextFactory.Create(query, ExtendableContentRepository)); }