Method Can
Can(Operation, T, object)
Checks if the specified operation can be performed and throws a warning if not.
public bool Can(Operation operation, T entity = null, object sourceEntity = null)
Parameters
operationOperationThe operation to check.
entityTThe entity to check.
sourceEntityobjectThe source entity.
Returns
- bool
True if the operation can be performed, otherwise false.
Can<TOther>(Operation, TOther)
Checks if the specified operation can be performed for the given entity.
public bool Can<TOther>(Operation operation, TOther entity) where TOther : class, IEntityWithKey<T>
Parameters
operationOperationThe operation to check.
entityTOtherThe entity to check.
Returns
- bool
True if the operation can be performed, otherwise false.
Type Parameters
TOtherThe type of the entity.