View Source
Class EntityBase
Provides a base class for entities.
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
[DataContract(IsReference = true)]
public abstract class EntityBase : BeingDirtyBase, IRememberBeingDirty, ICanBeDirty, IEntity, IDeepCloneable
Properties
View Source
CreateDate
Gets or sets the creation date.
Declaration
[DataMember]
public DateTime CreateDate { get; set; }
Property Value
Type |
Description |
DateTime |
|
View Source
DeleteDate
Gets or sets the delete date.
Declaration
[DataMember]
public DateTime? DeleteDate { get; set; }
Property Value
Type |
Description |
System.Nullable<DateTime> |
|
View Source
HasIdentity
Gets a value indicating whether the entity has an identity.
Declaration
[DataMember]
public virtual bool HasIdentity { get; }
Property Value
Type |
Description |
System.Boolean |
|
View Source
Id
Gets or sets the integer identifier of the entity.
Declaration
[DataMember]
public int Id { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
View Source
Key
Gets or sets the Guid unique identifier of the entity.
Declaration
[DataMember]
public Guid Key { get; set; }
Property Value
View Source
UpdateDate
Gets or sets the last update date.
Declaration
[DataMember]
public DateTime UpdateDate { get; set; }
Property Value
Type |
Description |
DateTime |
|
Methods
View Source
DeepClone()
Declaration
public object DeepClone()
Returns
Type |
Description |
System.Object |
|
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Equals(EntityBase)
Declaration
public virtual bool Equals(EntityBase other)
Parameters
Returns
Type |
Description |
System.Boolean |
|
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
View Source
Used by inheritors to modify the DeepCloning logic
Declaration
protected virtual void PerformDeepClone(object clone)
Parameters
Type |
Name |
Description |
System.Object |
clone |
|
View Source
ResetIdentity()
Resets the entity identity.
Declaration
public virtual void ResetIdentity()