🔧 Maintenance Alert: World will be on Read-Only Mode on February 18th, 10:00 PM – 11:00 PM EST / 7:00 PM – 8:00 PM PST / 4:00 AM – 5:00 AM CET (Feb 19). Browsing available, but log-ins and submissions will be disabled.
AI OnAI Off
🔧 Maintenance Alert: World will be on Read-Only Mode on February 18th, 10:00 PM – 11:00 PM EST / 7:00 PM – 8:00 PM PST / 4:00 AM – 5:00 AM CET (Feb 19). Browsing available, but log-ins and submissions will be disabled.
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