If the UniqueKey
is based on known object types such as Entities, this works very well. For example, you may need to loop through a list of items, and each item needs a unique key.
⬇️ Result | Source ➡️
-
Title:
Hitchhikers Guide to the Galaxy
- UniqueKey: i4yYDVtR-eid7md5eRsH
-
Title:
Good Omens
- UniqueKey: i4yYDVtR-eidcAcM-LSz
-
Title:
Phishing for Phools
- UniqueKey: i4yYDVtR-eidlkSe34Oo
-
Title:
The Last Continent
- UniqueKey: i4yYDVtR-eid_EnbtOtU
@inherits Custom.Hybrid.RazorTyped
@{
var books = AsItems(App.Data["Books"]);
}
<ol>
@foreach (var book in books) {
<li>
Title: <code>@book.Title</code> - UniqueKey: <code>@Kit.Key.UniqueKeyWith(book)</code>
</li>
}
</ol>