Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
Here you get all usages and then gets them for a type
var contentTypeRepository = ServiceLocator.Current.GetInstance<IContentTypeRepository>();
var contentModelUsage = ServiceLocator.Current.GetInstance<IContentModelUsage>();
var contentType = contentTypeRepository.Load<TestContent>();
var usages = contentModelUsage.ListContentOfContentType(contentType);
var yourSavedStuff = usages.Select(x => _contentLoader.Get<TestContent>(x.ContentLink));
Hi all !
I'm new to Episerver.
Version 11.13.0.0
I created a ContentData TestContent class which looks like this :
Then I saved a sample through Controller as following:
Then I checked in database that it did saved as i wanted and it is a success.
My question: I want to be able to get a list of all the things I saved earlier of this content type which is TestContent from a controller.
Thanks for all help