Glass Mapper version 5 

As of my last knowledge update in January 2022, Glass Mapper’s latest version was Glass Mapper v5.

However, keep in mind that software versions may have changed since then. To get the most accurate and up-to-date information about Glass Mapper, including its current version and any subsequent updates, I recommend checking the official Glass Mapper GitHub repository or the official Glass Mapper website.

Here are the general steps to find the latest version:

  1. GitHub Repository: Visit the Glass.Mapper.Sc GitHub repository to find the latest releases and information about the project.
  2. Official Website: Check the official Glass Mapper website for announcements and documentation.
  3. NuGet Package: You can also check the NuGet package page for Glass.Mapper.Sc to see the available versions.

Remember to refer to the documentation or release notes provided by Glass Mapper for details on new features, improvements, and any breaking changes introduced in each version.

Breaking changes in version 5

The upgrade documentation gives the following breaking changes:

  • SitecoreContext has changed significantly
  • GetCurrentItem method has been renamed to GetContentItem
  • Some methods require calling the context.SitecoreService
  • Disabling of lazy loading has changed
  • SitecoreService method parameters have changed.

Deprecated features and what to do instead

According to the documentation, there are a number of commonly used features in version 4 that have been deprecated in version 5, so we have put together a list and suggested ways to overcome them:

  • ISitecoreContext, GlassView, GlassContoller are obsolete and have been marked as deprecated
  • ISitecoreContext – use IMvcContext, IRequestContext, IWebFormsContext instead depending on where you are
  • GlassView – use the new Html helper methods instead
  • GlassController – Similar to ISitecoreContext, use IMvcContext instead.

Deixe um comentário

Trending