Class BaseEntity
Common entity base.
public abstract class BaseEntity
- Inheritance
-
BaseEntity
- Derived
- Inherited Members
- Extension Methods
Constructors
BaseEntity()
protected BaseEntity()
Properties
Id
Indentifier.
public int Id { get; set; }
Property Value
Methods
Equals(object?)
Check for entity equality.
public override bool Equals(object? o)
Parameters
o
object
Returns
Remarks
The override returns false if o
is null or the types of this and o
do not match exactly.
Otherwise the Id is checked for equality. (If this object's Id is the default value (0), it is assumed of not beeing stored yet and thus referenc equality is checked.)
GetHashCode()
public override int GetHashCode()
Returns
NewCopy<T>()
New shallow copy of T
with Id == 0.
public T NewCopy<T>() where T : BaseEntity
Returns
- T
Type Parameters
T