x19
x19

Reputation: 8783

Difference between Umbraco.Core.Models.Content class and umbraco.cms.businesslogic.web.Document class

What are different between Umbraco.Core.Models.Content class and umbraco.cms.businesslogic.web.Document class?

In other words, What are the benefits of using Content class instead of Document class?

I know Document class is obsoleted in Umbraco version 6.x and newer.

Upvotes: 0

Views: 814

Answers (1)

sitereactor
sitereactor

Reputation: 400

Umbraco.Core.Models.Content is the replacement for the Document class from version 6 and forward. It covers the same concept of Content in the umbraco back office, but the Document class is considered legacy and therefore obsolete.

The Document class has been refactored to use the Content class and ContentService under the hood, so its basically just a wrapper class since v6 was introduced. So its difficult to say or argue there is an advantage to using one over the other as they have become more or less the same. This was done in order to maintain backwards compatibility while introducing a new (management) api in version 6.

I would recommend using the Content class and ContentService for doing content management operations through the api.

Upvotes: 4

Related Questions