Class EntityHelper
Assembly: Volo.Abp.Ddd.Domain.dll
Syntax
public static class EntityHelper
Fields
IsValueObjectPredicate
Declaration
public static Func<Type, bool> IsValueObjectPredicate
Field Value
Methods
CheckEntity(Type)
Declaration
public static void CheckEntity(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
CreateEqualityExpressionForId<TEntity, TKey>(TKey)
Declaration
public static Expression<Func<TEntity, bool>> CreateEqualityExpressionForId<TEntity, TKey>(TKey id) where TEntity : IEntity<TKey>
Parameters
Type |
Name |
Description |
TKey |
id |
|
Returns
Type Parameters
Name |
Description |
TEntity |
|
TKey |
|
EntityEquals(IEntity?, IEntity?)
Declaration
public static bool EntityEquals(IEntity? entity1, IEntity? entity2)
Parameters
Returns
FindPrimaryKeyType(Type)
Declaration
public static Type? FindPrimaryKeyType(Type entityType)
Parameters
Type |
Name |
Description |
Type |
entityType |
|
Returns
FindPrimaryKeyType<TEntity>()
Declaration
public static Type? FindPrimaryKeyType<TEntity>() where TEntity : IEntity
Returns
Type Parameters
HasDefaultId<TKey>(IEntity<TKey>)
Declaration
public static bool HasDefaultId<TKey>(IEntity<TKey> entity)
Parameters
Type |
Name |
Description |
IEntity<TKey> |
entity |
|
Returns
Type Parameters
HasDefaultKeys(IEntity)
Declaration
public static bool HasDefaultKeys(IEntity entity)
Parameters
Type |
Name |
Description |
IEntity |
entity |
|
Returns
IsEntity(Type)
Declaration
public static bool IsEntity(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
IsEntityWithId(Type)
Declaration
public static bool IsEntityWithId(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
IsMultiTenant(Type)
Declaration
public static bool IsMultiTenant(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
IsMultiTenant<TEntity>()
Declaration
public static bool IsMultiTenant<TEntity>() where TEntity : IEntity
Returns
Type Parameters
IsValueObject(object?)
Declaration
public static bool IsValueObject(object? obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
IsValueObject(Type)
Declaration
public static bool IsValueObject(Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
TrySetId<TKey>(IEntity<TKey>, Func<TKey>, bool)
Declaration
public static void TrySetId<TKey>(IEntity<TKey> entity, Func<TKey> idFactory, bool checkForDisableIdGenerationAttribute = false)
Parameters
Type |
Name |
Description |
IEntity<TKey> |
entity |
|
Func<TKey> |
idFactory |
|
bool |
checkForDisableIdGenerationAttribute |
|
Type Parameters
TrySetTenantId(IEntity)
Declaration
public static void TrySetTenantId(IEntity entity)
Parameters
Type |
Name |
Description |
IEntity |
entity |
|