Schema
Describes the database schema for an entity type.
Propriedades
public IReadOnlyList<SchemaColumn> AllColumns { get; }
value = schema.AllColumns
Gets all columns including the identity column.
public IReadOnlyList<SchemaColumn> Columns { get; set; }
value = schema.Columns
schema.Columns = value
Gets or sets the non-identity columns of the schema.
public Type EntityType { get; set; }
value = schema.EntityType
schema.EntityType = value
Gets the CLR entity type this schema describes.
public Func<object> Factory { get; set; }
value = schema.Factory
schema.Factory = value
Gets the factory delegate used to create new entity instances.
public SchemaColumn Identity { get; set; }
value = schema.Identity
schema.Identity = value
Gets or sets the identity (primary key) column, or null if none.
public IReadOnlyList<SchemaColumn> IndexColumns { get; }
value = schema.IndexColumns
Gets columns that are indexed.
public bool IsInitialized { get; private set; }
value = schema.IsInitialized
schema.IsInitialized = value
True after SchemaColumn}) has filled in the reflection-derived metadata. SchemaRegistry exposes only initialised instances through TryGet so a parallel reader cannot observe a half-built schema while another thread is still walking properties.
public bool IsView { get; set; }
value = schema.IsView
schema.IsView = value
Gets whether this schema maps to a database view.
public bool NoCache { get; set; }
value = schema.NoCache
schema.NoCache = value
Gets whether caching is disabled for this schema.
public IReadOnlyList<SchemaColumn> NonReadOnlyColumns { get; }
value = schema.NonReadOnlyColumns
Gets columns that are writable (not read-only).
public bool ReadOnly { get; }
value = schema.ReadOnly
Gets whether the schema is effectively read-only (no writable columns).
public IReadOnlyList<SchemaColumn> ReadOnlyColumns { get; }
value = schema.ReadOnlyColumns
Gets columns that are read-only.
public string TableName { get; set; }
value = schema.TableName
schema.TableName = value
Gets the database table name.
public IReadOnlyList<SchemaColumn> UniqueColumns { get; }
value = schema.UniqueColumns
Gets columns that have a unique constraint.
Métodos
public object CreateEntity()
result = schema.CreateEntity()
Creates a new entity instance using the configured factory.
internal void SetColumnsAndIdentity(SchemaColumn identity, IReadOnlyList<SchemaColumn> columns)
schema.SetColumnsAndIdentity(identity, columns)
Sets identity and columns in a single call, resetting derived caches. Used by SchemaRegistry for two-phase initialization.
public SchemaColumn TryGetColumn(string name)
result = schema.TryGetColumn(name)
Tries to find a column by name (case-insensitive), returning null if not found.