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
operationOperationThe operation to check.
entityTThe entity to check.
sourceObjectobjectThe source object.
Returns
- bool
trueif 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
operationOperationThe operation to check.
entityTOtherThe entity to check.
Returns
- bool
trueif the operation can be performed on the entity; otherwise,false.
Type Parameters
TOtherThe type of entity.