Beispiel #1
0
        private async Task <ContentDto> GetContentByIdAsync(int id)
        {
            var content = await _contentManager.GetCMSContentByIdAsync(id);

            if (content == null)
            {
                throw new UserFriendlyException("Could not found the content, maybe it's deleted.");
            }
            return(content.MapTo <ContentDto>());
        }