Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi All,
What is most efficient way of getting IEnumerable
Something similar to:
IEnumerable<IContent> all = this.GetContentService().GetAll() all.Where(x => x.ContentType.Alias.Equals(DocType));
Regards, L
If you already know your DocType ID, you can do this:
IContentService cs = ApplicationContext.Current.Services.ContentService; IEnumerable<IContent> content = cs.GetContentOfContentType(1224);
If you don't then you can get your content type from the content type service:
IContentService cs = ApplicationContext.Current.Services.ContentService; IContentTypeService cts = ApplicationContext.Current.Services.ContentTypeService; IContentType ct = cts.GetContentType("docTypeAlias"); IEnumerable<IContent> content = cs.GetContentOfContentType(ct.Id);
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
IContent By Document Type
Hi All,
What is most efficient way of getting IEnumerable
Something similar to:
Regards, L
If you already know your DocType ID, you can do this:
If you don't then you can get your content type from the content type service:
is working on a reply...