Class EntityResolver

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. See IEntityResolver for example usage.

Inheritance
System.Object
EntityResolver
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Data.Entity.Internal
Assembly: EPiServer.Data.dll
Version: 11.20.7
Syntax
[ServiceConfiguration(typeof(IEntityResolver), Lifecycle = ServiceInstanceScope.Singleton)]
public class EntityResolver : IEntityResolver

Constructors

EntityResolver()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the EntityTypeResolver class.

Declaration
public EntityResolver()

EntityResolver(ServiceAccessor<IDatabaseExecutor>, IEntityTypeResolver)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the EntityTypeResolver class.

Declaration
public EntityResolver(ServiceAccessor<IDatabaseExecutor> databaseHandlerFactoryMethod, IEntityTypeResolver entityTypeResolver)
Parameters
Type Name Description
ServiceAccessor<IDatabaseExecutor> databaseHandlerFactoryMethod

The factory method responsible for creating an instance of an IDatabaseExecutor when required.

IEntityTypeResolver entityTypeResolver

The entity type resolver to use to resolve entity types.

Methods

GetDatabaseHandler()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets an instance of the current IDatabaseExecutor handler to use for any calls to the database.

Declaration
protected IDatabaseExecutor GetDatabaseHandler()
Returns
Type Description
IDatabaseExecutor

The IDatabaseExecutor that should be used.

GetEntityReference(Guid)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the EntityReference that refers to the IEntity with the specified unique identity.

Declaration
public virtual EntityReference GetEntityReference(Guid uniqueId)
Parameters
Type Name Description
System.Guid uniqueId

The unique identity of the entity.

Returns
Type Description
EntityReference

The EntityReference that referes to the IEntity with the specified unique identity or Empty if not found.

Remarks

This method will always result in a database call. Use with caution.

GetEntityUniqueID(EntityReference)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the unique identity of the IEntity that is referenced by the specified EntityReference.

Declaration
public virtual Guid GetEntityUniqueID(EntityReference entityReference)
Parameters
Type Name Description
EntityReference entityReference

The reference to the entity.

Returns
Type Description
System.Guid

The unique identity of the IEntity that the specified EntityReference references. or System.Guid.Empty if no entity was found.

Remarks

This method will normally result in at least one database call. Use with caution.

Implements

Extension Methods