Table of Contents

Interface ITable

Namespace
Microsoft.EntityFrameworkCore.Metadata
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

Represents a table in the database.

public interface ITable : ITableBase, IAnnotatable
Inherited Members
Extension Methods

Properties

CheckConstraints

Gets the check constraints for this table.

IEnumerable<ICheckConstraint> CheckConstraints { get; }

Property Value

IEnumerable<ICheckConstraint>

Columns

Gets the columns defined for this table.

IEnumerable<IColumn> Columns { get; }

Property Value

IEnumerable<IColumn>

Comment

Gets the comment for this table.

string Comment { get; }

Property Value

string

EntityTypeMappings

Gets the entity type mappings.

IEnumerable<ITableMapping> EntityTypeMappings { get; }

Property Value

IEnumerable<ITableMapping>

ForeignKeyConstraints

Gets the foreing key constraints for this table.

IEnumerable<IForeignKeyConstraint> ForeignKeyConstraints { get; }

Property Value

IEnumerable<IForeignKeyConstraint>

Indexes

Gets the indexes for this table.

IEnumerable<ITableIndex> Indexes { get; }

Property Value

IEnumerable<ITableIndex>

IsExcludedFromMigrations

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

bool IsExcludedFromMigrations { get; }

Property Value

bool

PrimaryKey

Gets the primary key for this table.

IPrimaryKeyConstraint PrimaryKey { get; }

Property Value

IPrimaryKeyConstraint

UniqueConstraints

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

IEnumerable<IUniqueConstraint> UniqueConstraints { get; }

Property Value

IEnumerable<IUniqueConstraint>

Methods

FindColumn(IProperty)

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

IColumn FindColumn(IProperty property)

Parameters

property IProperty

Returns

IColumn

FindColumn(string)

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

IColumn FindColumn(string name)

Parameters

name string

Returns

IColumn