Class RedbListItem
REDB list item entity with direct data storage.
Maps to _list_items table in PostgreSQL.
public class RedbListItem : IRedbListItem
Inheritance
Implements
Properties
IdList
List identifier this item belongs to.
[JsonPropertyName("id_list")]
public long IdList { get; set; }
IdObject
Linked object identifier (optional).
[JsonPropertyName("id_object")]
public long? IdObject { get; set; }
IsObjectLoaderAvailable
Check if global loader is available.
public static bool IsObjectLoaderAvailable { get; }
IsObjectReference
Check if item is object reference.
[JsonIgnore]
public bool IsObjectReference { get; }
Object
Linked object with lazy loading.
[JsonPropertyName("object")]
public IRedbObject? Object { get; set; }
Methods
ForList(IRedbList, string?, string?, IRedbObject)
Create ListItem with linked object.
public static RedbListItem ForList(IRedbList list, string? value, string? alias, IRedbObject linkedObject)
ForList(IRedbList, string?, string?, long?)
Create ListItem for specific list.
public static RedbListItem ForList(IRedbList list, string? value, string? alias = null, long? idObject = null)
SetGlobalObjectLoader(Func<long, Task<IRedbObject?>>)
Set global object loader for all ListItems.
public static void SetGlobalObjectLoader(Func<long, Task<IRedbObject?>> loader)
Constructors
RedbListItem()
Default constructor for deserialization and mapping.
RedbListItem(IRedbList, string?, string?, IRedbObject)
Constructor for creating item with linked object.
RedbListItem(IRedbList, string?, string?, long?)
Constructor for creating item linked to list.