New answers tagged

3

GlassMapper functionality was removed from 5.x SitecoreContext. That's why you cannot call sitecoreContext.GetItem anymore. According to Glass Mapper documenation (link below): sitecoreContext.GetItem should be replaced with mvcContext.SitecoreService.GetItem Here you can read about other tips & tricks for upgrading from v4 to v5: https://...


5

As I can see you are using GlassMapper 5 version and in GlassMapper 5 version SitecoreContext, GlassView, GlassController are obsolete. On behalf of SitecoreContext you can Use either IRequestContext, IMvcContext or IWebFormsContext. Or you can use SitecoreContext as well, by initializing it first then use it. var objSitecoreContext = new SitecoreContext(); ...


Top 50 recent answers are included