Try our conversational search powered by Generative AI!

Class EntityTypeResolver

This class supports the EPiServer infrastructure and is not intended to be used directly from your code. See IEntityTypeResolver for example usage.

Inheritance
System.Object
EntityTypeResolver
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
Assembly: EPiServer.Data.dll
Version: 7.19.2
Syntax
public class EntityTypeResolver : IEntityTypeResolver

Constructors

EntityTypeResolver()

Initializes a new instance of the EntityTypeResolver class.

Declaration
public EntityTypeResolver()

EntityTypeResolver(IDatabaseFactory)

Initializes a new instance of the EntityTypeResolver class.

Declaration
public EntityTypeResolver(IDatabaseFactory databaseHandlerFactory)
Parameters
Type Name Description
IDatabaseFactory databaseHandlerFactory

The factory responsible for creating an instance of an IDatabaseHandler when required.

Methods

GetDatabaseHandler()

Gets an instance of the current IDatabaseHandler handler to use for any calls to the database.

Declaration
protected IDatabaseHandler GetDatabaseHandler()
Returns
Type Description
IDatabaseHandler

The IDatabaseHandler that should be used.

GetTypeByID(Int32)

Gets the System.Type by its database id.

Declaration
public virtual Type GetTypeByID(int id)
Parameters
Type Name Description
System.Int32 id

The ID for which to get of the System.Type

Returns
Type Description
System.Type

The type associated with the given id.

GetTypeID(Type, Boolean)

Gets the ID representing a System.Type in the database

Declaration
public virtual int GetTypeID(Type type, bool ignoreOverrideAttribute)
Parameters
Type Name Description
System.Type type

The System.Type for which to get the ID

System.Boolean ignoreOverrideAttribute

Whether to ignore the EntityTypeOverrideAttribute attribute.

Returns
Type Description
System.Int32

Returns the integer ID that represents the type in the database.

GetTypeName(Type, Boolean)

Gets the name of a System.Type as used in the database

Declaration
public virtual string GetTypeName(Type type, bool ignoreOverrideAttribute)
Parameters
Type Name Description
System.Type type

The System.Type for which to to get the name

System.Boolean ignoreOverrideAttribute

Whether to ignore the EntityTypeOverrideAttribute attribute.

Returns
Type Description
System.String

The type name.

Implements

Extension Methods