I am currently trying to get the references to a Content item within Episerver from commerce. Some items within the commerce section of the website, have a content reference field on them where I can select a specific content item to be referenced. I am then using the Content Repository to get the references to the item using the following method:
var repository = ServiceLocator.Current.GetInstance();
var references = repository.GetReferencesToContent(content.ContentLink, true).ToList();
After this has been run, the references from commerce do not seem to exist. I also tried adding blocks to a block area property that is present on the model. When I go to delete the block in the CMS, it does not warn me about the block being linked to the commerce item.
Is there another way that I can get the referenced items? Also, would this be a bug within Episerver
No, it's not a bug, it's a (missing) feature. I'll add a story to our backlog so we can look into it, but no promises it'll be done anytime soon.