Interface IIdKeyMapRepository
Represents a repository for mapping between entity identifiers and unique keys.
Namespace: Umbraco.Cms.Core.Persistence.Repositories
Assembly: Umbraco.Core.dll
Syntax
public interface IIdKeyMapRepository
Methods
View SourceGetIdForKey(Guid, UmbracoObjectTypes)
Gets the integer identifier for a given unique key.
Declaration
int? GetIdForKey(Guid key, UmbracoObjectTypes umbracoObjectType)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | key | The unique key of the entity. |
| UmbracoObjectTypes | umbracoObjectType | The type of the Umbraco object. |
Returns
| Type | Description |
|---|---|
| int? | The integer identifier if found; otherwise, |
GetIdForKey(int, UmbracoObjectTypes)
Gets the unique key for a given integer identifier.
Declaration
Guid? GetIdForKey(int id, UmbracoObjectTypes umbracoObjectType)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The integer identifier of the entity. |
| UmbracoObjectTypes | umbracoObjectType | The type of the Umbraco object. |
Returns
| Type | Description |
|---|---|
| Guid? | The unique key if found; otherwise, |