Path: redb/redb.Core/Models/Contracts/IRedbList.cs Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Core/Models/Contracts/IRedbList.cs ---- using System; using System.Collections.Generic; namespace redb.Core.Models.Contracts { /// /// REDB list interface /// Represents a reference list for list-type fields /// public interface IRedbList { /// /// Unique list identifier /// long Id { get; } /// /// List name /// string Name { get; } /// /// List alias (short name) /// string? Alias { get; } // === DDD methods === /// /// List items collection (read-only) /// IReadOnlyCollection Items { get; } /// /// Add item to list (Aggregate Root pattern) /// Automatically sets IdList /// IRedbListItem AddItem(string value, long? idObject = null, string? alias = null); /// /// Add item to list with linked object (Aggregate Root pattern) /// Automatically extracts Id from object /// IRedbListItem AddItem(string value, IRedbObject linkedObject, string? alias = null); /// /// Create item for list without adding to collection /// Useful when you need to save item separately /// IRedbListItem CreateItem(string value, long? idObject = null, string? alias = null); /// /// Create item for list with linked object /// Automatically extracts Id from object /// IRedbListItem CreateItem(string value, IRedbObject linkedObject, string? alias = null); /// /// Remove item from list /// bool RemoveItem(IRedbListItem item); /// /// Find item by value /// IRedbListItem? FindItemByValue(string value); } }