Вопрос

In Sitecore I am trying to understand what are the advantages of using Glass Mapper versus other ORMS such as Entity Framework?

Это было полезно?

Решение

The purpose of Glass is to map your Sitecore content data to and from strongly typed classes. The purpose of Entity Framework is to map SQL Server data to and from strongly typed classes.

They both have similar advantages - in that they automate the mapping of raw data into model classes. This helps standardise the process of reading and writing data in your solution, and hopefully help you reduce bugs and increase productivity. They can also help you do things like Unit Test code by abstracting away the data layer.

You could well use both in one project.

But they're not interoperable - you would not use Entity Framework on Sitecore data, and you would not use Glass on SQL Server data.

-- Edit to add --

I realise the general benefits of ORMs have been discussed in another SO question here

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top