/// <summary> /// Copy content item /// </summary> /// <param name="contentItemId"></param> /// <returns></returns> /// <exception cref="Exception"></exception> public async Task <ContentItem> CopyContentItem(long contentItemId) { var existing = await _contentItemRepository.GetContentItemById(contentItemId); if (existing == null) { throw new Exception("Content item doesn't exist"); } var mapped = _mapper.Map <ContentItem>(existing); mapped.ContentItemId = default; mapped.Title += " (Copy)"; return(await CreateContentItem(mapped)); }