IEntity<TKey> (if entity has a serial int ID, use IEntityWithSerial))Idpublic interface IEntity;
public interface IEntity<TKey> : IEntity
{
public TKey Id { get; set; }
}
Use SearchObject for filtering entities.
SearchObject<TKey> class (or SearchObject when TKey is of type int)ICollection<TKey> when filtering on key-properties for flexibilityMinCreated, MaxCreated, MinLastModified, MaxLastModified) are interpreted as UTC; local kinds are converted, unspecified kinds are assumed UTCpublic record SearchObject : SearchObject<int>;
public record SearchObject<TKey> : ISearchObject<TKey>
{
public TKey? Id { get; set; }
public ICollection<TKey>? Ids { get; set; }
public ICollection<TKey>? Exclude { get; set; }
public string? Q { get; set; }
public DateTime? MinCreated { get; set; }
public DateTime? MaxCreated { get; set; }
public DateTime? MinLastModified { get; set; }
public DateTime? MaxLastModified { get; set; }
public ArchivedFilter? Archived { get; set; }
}
Archived Property (soft delete):
ArchivedFilter — Excluded (archived rows invisible), Included (live + archived), Only (archived only)?archived=; null falls back to DefaultArchivedFilter configured on UseEntities()IArchivable filter only — other global filters (tenant/owner scoping) keep applyingQ Property (General Text Search):
Q property serves as a general text search fieldIHasTitle or IHasDescriptionQKeywordHelper for wildcard support (*) in search queriesEntitySortBy is used.ISortedQueryBuilder implementationspublic enum EntitySortBy
{
Default,
Id,
IdDesc,
Created,
CreatedDesc,
LastModified,
LastModifiedDesc,
}
EntityIncludes is used.[Flags]
public enum MyEntityIncludes
{
Default = 0,
// Add custom options here
Option1 = 1 << 0,
Option2 = 1 << 1,
All = Option1 | Option2
}