• Not Answered

GlassMapper upgrade to Version 5- SitecoreService.GetItem not returning children's

var TemplateID = Guid.Parse("{51A26CD4-FCB5-4A3C-8720-2D60F625A678}");


var _Options = new GetItemByIdOptions(TemplateID)
{
InferType = true,
Lazy = Glass.Mapper.LazyLoading.Enabled
};

  var target = context.SitecoreService.GetItem<IGlassModel>(_Options);

1 Reply

  • What is the TemplateID when you do a GetItem you need to supply the ItemID or path.. not the TemplateID

    var model = sitecoreService.GetItem<HelloWorld>("/sitecore/content/home");