logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class StructuredRecord

    A single row-like record stored by an IStructuredStore: an optional store-assigned identity and a named set of typed field values.

    Inheritance
    object
    StructuredRecord
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Persistence.Domain.ValueObjects
    Assembly: Serenity.Global.Domain.dll
    Syntax
    public sealed class StructuredRecord

    Constructors

    StructuredRecord(string, IReadOnlyDictionary<string, StructuredValue>)

    Creates a new StructuredRecord, defensively copying fields.

    Declaration
    public StructuredRecord(string id, IReadOnlyDictionary<string, StructuredValue> fields)
    Parameters
    Type Name Description
    string id

    The store-assigned identity, or null.

    IReadOnlyDictionary<string, StructuredValue> fields

    The record's field values. A null value is treated as an empty record.

    Properties

    Fields

    The record's field values, keyed by field name.

    Declaration
    public IReadOnlyDictionary<string, StructuredValue> Fields { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, StructuredValue>

    Id

    The store-assigned identity of this record, or null when not yet persisted or not applicable.

    Declaration
    public string Id { get; }
    Property Value
    Type Description
    string

    Methods

    GetValueOrNull(string)

    Gets the value of field, or Null when the field is absent.

    Declaration
    public StructuredValue GetValueOrNull(string field)
    Parameters
    Type Name Description
    string field
    Returns
    Type Description
    StructuredValue

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    WithId(string)

    Creates a copy of this record with a different identity, keeping the same fields.

    Declaration
    public StructuredRecord WithId(string id)
    Parameters
    Type Name Description
    string id
    Returns
    Type Description
    StructuredRecord
    In this article
    © 2026 Serenity. All Rights Reserved