Delen via


ITable Interface

Definition

Represents a table in the database.

public interface ITable : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable, Microsoft.EntityFrameworkCore.Metadata.ITableBase
type ITable = interface
    interface ITableBase
    interface IAnnotatable
type ITable = interface
    interface ITableBase
    interface IAnnotatable
    interface IReadOnlyAnnotatable
Public Interface ITable
Implements IAnnotatable, ITableBase
Implements

Remarks

See Modeling entity types and relationships for more information and examples.

Properties

CheckConstraints

Gets the check constraints for this table.

Columns

Gets the columns defined for this table.

Comment

Gets the comment for this table.

ComplexTypeMappings

Gets the complex type mappings.

(Inherited from ITableBase)
EntityTypeMappings

Gets the entity type mappings.

ForeignKeyConstraints

Gets the foreign key constraints for this table.

Indexes

Gets the indexes for this table.

IsExcludedFromMigrations

Gets the value indicating whether the table should be managed by migrations

IsShared

Gets the value indicating whether multiple entity types are sharing the rows in the table.

(Inherited from ITableBase)
Item[String]

Gets the value of the annotation with the given name, returning null if it does not exist.

(Inherited from IReadOnlyAnnotatable)
Model

Gets the database model.

(Inherited from ITableBase)
Name

Gets the name of the table in the database.

(Inherited from ITableBase)
PrimaryKey

Gets the primary key for this table.

ReferencingForeignKeyConstraints

Gets the foreign key constraints referencing this table.

Schema

Gets the schema of the table in the database.

(Inherited from ITableBase)
SchemaQualifiedName

Gets the schema-qualified name of the table in the database.

(Inherited from ITableBase)
Triggers

Gets the triggers for this table.

UniqueConstraints

Gets the unique constraints including the primary key for this table.

Methods

AddRuntimeAnnotation(String, Object)

Adds a runtime annotation to this object. Throws if an annotation with the specified name already exists.

(Inherited from IAnnotatable)
AnnotationsToDebugString(Int32)

Gets the debug string for all annotations declared on the object.

(Inherited from IReadOnlyAnnotatable)
FindAnnotation(String)

Gets the annotation with the given name, returning null if it does not exist.

(Inherited from IReadOnlyAnnotatable)
FindColumn(IProperty)

Gets the column mapped to the given property. Returns null if no column is mapped to the given property.

FindColumn(String)

Gets the column with a given name. Returns null if no column with the given name is defined.

FindRuntimeAnnotation(String)

Gets the runtime annotation with the given name, returning null if it does not exist.

(Inherited from IAnnotatable)
FindRuntimeAnnotationValue(String)

Gets the value of the runtime annotation with the given name, returning null if it does not exist.

(Inherited from IAnnotatable)
GetAnnotation(String)

Gets the annotation with the given name, throwing if it does not exist.

(Inherited from IReadOnlyAnnotatable)
GetAnnotations()

Gets all annotations on the current object.

(Inherited from IReadOnlyAnnotatable)
GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

Gets the value of the runtime annotation with the given name, adding it if one does not exist.

(Inherited from IAnnotatable)
GetReferencingRowInternalForeignKeys(IEntityType)

Gets the foreign keys referencing the given entity type from other entity types sharing this table.

(Inherited from ITableBase)
GetRowInternalForeignKeys(IEntityType)

Gets the foreign keys for the given entity type that point to other entity types sharing this table.

(Inherited from ITableBase)
GetRuntimeAnnotations()

Gets all the runtime annotations on the current object.

(Inherited from IAnnotatable)
IsOptional(IEntityType)

Gets the value indicating whether an entity of the given type might not be present in a row.

(Inherited from ITableBase)
IsOptional(ITypeBase)

Gets the value indicating whether an entity of the given type might not be present in a row.

(Inherited from ITableBase)
RemoveRuntimeAnnotation(String)

Removes the given runtime annotation from this object.

(Inherited from IAnnotatable)
SetRuntimeAnnotation(String, Object)

Sets the runtime annotation stored under the given key. Overwrites the existing annotation if an annotation with the specified name already exists.

(Inherited from IAnnotatable)
ToDebugString(MetadataDebugStringOptions, Int32)

Creates a human-readable representation of the given metadata.

Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.

Explicit Interface Implementations

ITableBase.ToDebugString(MetadataDebugStringOptions, Int32)

Creates a human-readable representation of the given metadata.

Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.

Extension Methods

AnnotationsToDebugString(IAnnotatable, Int32)

Gets the debug string for all annotations declared on the object.

GetAnnotation(IAnnotatable, String)

Gets the annotation with the given name, throwing if it does not exist.

ToDebugString(ITable, MetadataDebugStringOptions, Int32)

Creates a human-readable representation of the given metadata.

Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.

IsSqlReturningClauseUsed(ITable)

Returns a value indicating whether to use the SQL RETURNING clause when saving changes to the table. The RETURNING clause is incompatible with certain Sqlite features, such as virtual tables or tables with AFTER triggers.

IsSqlOutputClauseUsed(ITable)

Returns a value indicating whether to use the SQL OUTPUT clause when saving changes to the table. The OUTPUT clause is incompatible with certain SQL Server features, such as tables with triggers.

Applies to