Method CanDelete
CanDelete(T, object)
Determines whether the entity can be deleted.
public virtual bool CanDelete(T entity, object sourceEntity = null)
Parameters
entity
TThe entity to be deleted.
sourceEntity
objectThe source entity.
Returns
- bool
true
if the entity can be deleted; otherwise,false
.
CanDelete()
Determines whether the entity can be deleted.
public virtual bool CanDelete()
Returns
- bool
true
if the entity can be deleted; otherwise,false
.
CanDelete(IPrimaryKey)
Determines whether the entity can be deleted based on the primary key.
public virtual bool CanDelete(IPrimaryKey primarykey)
Parameters
primarykey
IPrimaryKeyThe primary key of the entity.
Returns
- bool
true
if the entity can be deleted; otherwise,false
.