EntityExtensions Class

Namespace:
Weavy.Core.Helpers
Assembly:
Weavy.Core.dll

Helper methods for entities.

public static class EntityExtensions
Inheritance:
System.Object → EntityExtensions

Methods

Assert(IEntity, Permission, User) Throws a ForbiddenException if a user does not have the requested permission to an entity.
Boost(IEntity) Gets the boost factor for the fulltext index.
CssClass(IEntity) CSS class for an entity.
GetIcon(EntityType) Returns the name of a material design icon to use for the entity type.
HasPermission(IEntity, Permission, User) Check if the current user has the requested permission to the specified entity.
HasValue(IEntity, Boolean) Returns true if the entity has a value otherwise false.
Kind(IEntity) Returns a label that is suitable for display in lists and search results.
MetaData(App) Gets meta data for the specified app.
MetaData(Content) Gets meta data for the specified content item.
Pluralize(EntityType, Boolean) Returns the plural name of en entity type.
Value(IEntity, Boolean) Returns the actual underlying value of an IEntity.