Example #1
0
        /// <summary>
        /// Returns detailed information on a custom entity and it's latest version. This
        /// query is primarily used in the admin area because it is not version-specific
        /// and the CustomEntityDetails projection includes audit data and other additional
        /// information that should normally be hidden from a customer facing app.
        /// </summary>
        /// <param name="customEntityId">Id of the custom entity to find.</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 <CustomEntityDetails> GetCustomEntityDetailsByIdAsync(int customEntityId, IExecutionContext executionContext = null)
        {
            var query = new GetCustomEntityDetailsByIdQuery(customEntityId);

            return(_queryExecutor.ExecuteAsync(query, executionContext));
        }
        public Task <CustomEntityDetails> AsDetailsAsync()
        {
            var query = new GetCustomEntityDetailsByIdQuery(_customEntityId);

            return(ExtendableContentRepository.ExecuteQueryAsync(query));
        }
        public IContentRepositoryQueryContext <CustomEntityDetails> AsDetails()
        {
            var query = new GetCustomEntityDetailsByIdQuery(_customEntityId);

            return(ContentRepositoryQueryContextFactory.Create(query, ExtendableContentRepository));
        }