Table of Contents

Interface ITableBase

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

Represents a table-like object in the database.

public interface ITableBase : IAnnotatable

Properties

Columns

Gets the columns defined for this table.

IEnumerable<IColumnBase> Columns { get; }

Property Value

IEnumerable<IColumnBase>

EntityTypeMappings

Gets the entity type mappings.

IEnumerable<ITableMappingBase> EntityTypeMappings { get; }

Property Value

IEnumerable<ITableMappingBase>

IsShared

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

bool IsShared { get; }

Property Value

bool

Model

Gets the database model.

IRelationalModel Model { get; }

Property Value

IRelationalModel

Name

Gets the name of the table in the database.

string Name { get; }

Property Value

string

Schema

Gets the schema of the table in the database.

string Schema { get; }

Property Value

string

Methods

FindColumn(IProperty)

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

IColumnBase FindColumn(IProperty property)

Parameters

property IProperty

Returns

IColumnBase

FindColumn(string)

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

IColumnBase FindColumn(string name)

Parameters

name string

Returns

IColumnBase

GetReferencingRowInternalForeignKeys(IEntityType)

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

IEnumerable<IForeignKey> GetReferencingRowInternalForeignKeys(IEntityType entityType)

Parameters

entityType IEntityType

Returns

IEnumerable<IForeignKey>

GetRowInternalForeignKeys(IEntityType)

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

IEnumerable<IForeignKey> GetRowInternalForeignKeys(IEntityType entityType)

Parameters

entityType IEntityType

Returns

IEnumerable<IForeignKey>

IsOptional(IEntityType)

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

bool IsOptional(IEntityType entityType)

Parameters

entityType IEntityType

Returns

bool