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.
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