Skip to main content
Bumped by Community user

I am trying to return sitecore items list from my controller as list of model type 

eg. public List Results { get; set; } i public List<PageContent> Results { get; set; }

I need to get the list of items in Results. Using

Using glassmapper this is easily done this.Results.Add(siteContext.GetItem(result.Document.GetItem().ID.Guid)); but i

this.Results.Add(siteContext.GetItem<PageContent>(result.Document.GetItem().ID.Guid));

but I need to get it without glassmapper  . Any way of doing this.?

I am trying to return sitecore items list from my controller as list of model type eg. public List Results { get; set; } i need to get the list of items in Results. Using glassmapper this is easily done this.Results.Add(siteContext.GetItem(result.Document.GetItem().ID.Guid)); but i need to get it without glassmapper  . Any way of doing this.

I am trying to return sitecore items list from my controller as list of model type 

eg. public List<PageContent> Results { get; set; }

I need to get the list of items in Results.

Using glassmapper this is easily done

this.Results.Add(siteContext.GetItem<PageContent>(result.Document.GetItem().ID.Guid));

but I need to get it without glassmapper. Any way of doing this?

Source Link

Return Sitecore item as list of Model

I am trying to return sitecore items list from my controller as list of model type eg. public List Results { get; set; } i need to get the list of items in Results. Using glassmapper this is easily done this.Results.Add(siteContext.GetItem(result.Document.GetItem().ID.Guid)); but i need to get it without glassmapper . Any way of doing this.