Class EntityResolver
See IEntity
Inheritance
Implements
Namespace: EPiServer.Data.Entity.Internal
Assembly: EPiServer.Data.dll
Version: 12.0.3Syntax
[ServiceConfiguration]
public class EntityResolver : Object, IEntityResolver
Constructors
EntityResolver()
Initializes a new instance of the Entity
Declaration
public EntityResolver()
EntityResolver(ServiceAccessor<IDatabaseExecutor>, IEntityTypeResolver)
Initializes a new instance of the Entity
Declaration
public EntityResolver(ServiceAccessor<IDatabaseExecutor> databaseHandlerFactoryMethod, IEntityTypeResolver entityTypeResolver)
Parameters
Type | Name | Description |
---|---|---|
Service |
databaseHandlerFactoryMethod | The factory method responsible for creating an instance of an IDatabase |
IEntity |
entityTypeResolver | The entity type resolver to use to resolve entity types. |
Methods
GetDatabaseHandler()
Gets an instance of the current IDatabase
Declaration
protected IDatabaseExecutor GetDatabaseHandler()
Returns
Type | Description |
---|---|
IDatabase |
The IDatabase |
GetEntityReference(Guid)
Gets the Entity
Declaration
public virtual EntityReference GetEntityReference(Guid uniqueId)
Parameters
Type | Name | Description |
---|---|---|
System. |
uniqueId | The unique identity of the entity. |
Returns
Type | Description |
---|---|
Entity |
The Entity |
Remarks
This method will always result in a database call. Use with caution.
GetEntityUniqueID(EntityReference)
Gets the unique identity of the IEntity that is referenced by the specified Entity
Declaration
public virtual Guid GetEntityUniqueID(EntityReference entityReference)
Parameters
Type | Name | Description |
---|---|---|
Entity |
entityReference | The reference to the entity. |
Returns
Type | Description |
---|---|
System. |
The unique identity of the IEntity that the specified Entity |
Remarks
This method will normally result in at least one database call. Use with caution.