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
operation
OperationThe operation to check.
entity
TThe entity to check.
sourceEntity
objectThe 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
operation
OperationThe operation to check.
entity
TOtherThe entity to check.
Returns
- bool
True if the operation can be performed, otherwise false.
Type Parameters
TOther
The type of the entity.