Class ContentTypeRepository
Repository for the Content
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public abstract class ContentTypeRepository : Object, IContentTypeRepository, IContentTypeRepository<ContentType>
Constructors
ContentTypeRepository()
Declaration
protected ContentTypeRepository()
Methods
Copy(ContentType)
Creates a copy of the specified content type in the data repository and returns it.
Declaration
public abstract ContentType Copy(ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentType | The Content |
Returns
Type | Description |
---|---|
Content |
The copy of the Content |
Copy(Int32)
Creates a copy of the specified content type in the data repository and returns it.
Declaration
public virtual ContentType Copy(int id)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The id of the Content |
Returns
Type | Description |
---|---|
Content |
The copy of the Content |
Copy(Type)
Creates a copy of the specified content type in the data repository and returns it.
Declaration
public virtual ContentType Copy(Type modelType)
Parameters
Type | Name | Description |
---|---|---|
System. |
modelType | The underlying System. |
Returns
Type | Description |
---|---|
Content |
The copy of the Content |
Delete(ContentType)
Deletes a Content
Declaration
public abstract void Delete(ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentType | The content type that is to be deleted. |
Delete(Int32)
Deletes a Content
Declaration
public virtual void Delete(int id)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The Content |
Delete(Type)
Deletes a Content
Declaration
public virtual void Delete(Type modelType)
Parameters
Type | Name | Description |
---|---|---|
System. |
modelType | The underlying System. |
List()
Lists all Content
Declaration
public abstract IEnumerable<ContentType> List()
Returns
Type | Description |
---|---|
System. |
Enumeration of Content |
Load(Guid)
Loads a Content
Declaration
public abstract ContentType Load(Guid guid)
Parameters
Type | Name | Description |
---|---|---|
System. |
guid | The Content |
Returns
Type | Description |
---|---|
Content |
The Content |
Load(Int32)
Loads a Content
Declaration
public abstract ContentType Load(int id)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The Content |
Returns
Type | Description |
---|---|
Content |
The Content |
Load(String)
Loads a Content
Declaration
public abstract ContentType Load(string name)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The Content |
Returns
Type | Description |
---|---|
Content |
The Content |
Load(Type)
Loads a Content
Declaration
public abstract ContentType Load(Type modelType)
Parameters
Type | Name | Description |
---|---|---|
System. |
modelType | The underlying System. |
Returns
Type | Description |
---|---|
Content |
The Content |
OnContentTypeDeleted(ContentType, ContentTypeEventArgs)
Raises the Content
Declaration
protected virtual void OnContentTypeDeleted(ContentType contentType, ContentTypeEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentType | Type of the content. |
Content |
args | The Content |
OnContentTypeSaved(ContentType, ContentTypeEventArgs)
Raises the Content
Declaration
protected virtual void OnContentTypeSaved(ContentType contentType, ContentTypeEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentType | Type of the content. |
Content |
args | The Content |
Save(ContentType)
Saves the specified Content
Declaration
public abstract void Save(ContentType contentType)
Parameters
Type | Name | Description |
---|---|---|
Content |
contentType | Type content type to save. |
Save(IEnumerable<ContentType>, ContentTypeSaveOptions)
NOTE: This is a pre-release API that is UNSTABLE and might not satisfy the compatibility requirements as denoted by its associated normal version.
Save list of Content
Declaration
public virtual void Save(IEnumerable<ContentType> contentTypes, ContentTypeSaveOptions options)
Parameters
Type | Name | Description |
---|---|---|
System. |
contentTypes | The content types. |
Content |
options | The content type save options. |
Events
ContentTypeDeleted
Occurs when a Content
Declaration
public static event EventHandler<ContentTypeEventArgs> ContentTypeDeleted
Event Type
Type | Description |
---|---|
System. |
ContentTypeSaved
Occurs when a Content
Declaration
public static event EventHandler<ContentTypeEventArgs> ContentTypeSaved
Event Type
Type | Description |
---|---|
System. |