Guides
These docs are for v1.13.1. Click to read the latest docs for v2.0.0.

DetachedContentTypeService

Documentation for the DetachedContentTypeService

The DetachedContentTypeService is responsible for managing the association of Umbraco ContentType(s) and Merchello DetachedContentType.

var detachedContentService = MerchelloContext.Current.Services.DetachedContentTypeService;
The DetachedContentTypeService is exposed through the MerchelloContext

Public Methods

CreateDetachedContentType(Guid, Guid, String, Boolean)Creates a IDetachedContentType without saving it to the database.
CreateDetachedContentType(EntityType, Guid, String, Boolean)Creates a IDetachedContentType without saving it to the database.
CreateDetachedContentTypeWithKey(Guid, Guid, String, Boolean)Creates a IDetachedContentType and saves to the database.
CreateDetachedContentTypeWithKey(EntityType, Guid, String, Boolean)Creates a IDetachedContentType and saves to the database.
Delete(IDetachedContentType, Boolean)Deletes a single instance of IDetachedContentType.
GetAllGets all IDetachedContentType(s).
GetByKeyGets a IDetachedContentType by it's unique key.
GetDetachedContentTypesByContentTypeKeyGets a collection of IDetachedContentType by the Umbraco content type key.
GetDetachedContentTypesByEntityTfKeyGets a collection of IDetachedContentType by the entity type key.
Save(IDetachedContentType, Boolean)Saves a single instance of IDetachedContentType.
Save(IEnumerable(IDetachedContentType), Boolean)Saves a collection of IDetachedContentType.

Events

CreatingOccurs before create
CreatedOccurs after create
DeletingOccurs before delete
DeletedOccurs after delete
SavingOccurs before save
SavedOccurs after save