Method Can
Can(Operation, T, object)
Determines whether the specified operation can be performed on the entity.
public bool Can(Operation operation, T entity = null, object sourceObject = null)
Parameters
operation
OperationThe operation to check.
entity
TThe entity to check.
sourceObject
objectThe source object.
Returns
- bool
true
if the operation can be performed on the entity; otherwise,false
.
Can<TOther>(Operation, TOther)
Determines whether the specified operation can be performed on the entity of type TOther
.
public bool Can<TOther>(Operation operation, TOther entity) where TOther : class, IEntityWithKey<T>
Parameters
operation
OperationThe operation to check.
entity
TOtherThe entity to check.
Returns
- bool
true
if the operation can be performed on the entity; otherwise,false
.
Type Parameters
TOther
The type of entity.