Table of Contents

Struct StoreObjectIdentifier

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

A type that represents the id of a store object

public readonly struct StoreObjectIdentifier : IComparable<StoreObjectIdentifier>, IEquatable<StoreObjectIdentifier>
Implements
Inherited Members

Properties

Name

Gets the table-like store object name.

public string Name { get; }

Property Value

string

Schema

Gets the table-like store object schema.

public string Schema { get; }

Property Value

string

StoreObjectType

Gets the table-like store object type.

public StoreObjectType StoreObjectType { get; }

Property Value

StoreObjectType

Methods

CompareTo(StoreObjectIdentifier)

public int CompareTo(StoreObjectIdentifier other)

Parameters

other StoreObjectIdentifier

Returns

int

Create(IEntityType, StoreObjectType)

Creates an id for the store object that the given entity type is mapped to />.

public static StoreObjectIdentifier? Create(IEntityType entityType, StoreObjectType type)

Parameters

entityType IEntityType

The entity type.

type StoreObjectType

The store object type.

Returns

StoreObjectIdentifier?

The store object id.

DbFunction(string)

Creates a function id.

public static StoreObjectIdentifier DbFunction(string modelName)

Parameters

modelName string

The function model name.

Returns

StoreObjectIdentifier

The function id.

DisplayName()

Gets the friendly display name for the store object.

public string DisplayName()

Returns

string

Equals(StoreObjectIdentifier)

public bool Equals(StoreObjectIdentifier other)

Parameters

other StoreObjectIdentifier

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

SqlQuery(IEntityType)

Creates an id for the SQL query mapped using RelationalEntityTypeBuilderExtensions.ToSqlQuery.

public static StoreObjectIdentifier SqlQuery(IEntityType entityType)

Parameters

entityType IEntityType

The entity type.

Returns

StoreObjectIdentifier

The SQL query id.

SqlQuery(string)

Creates a SQL query id.

public static StoreObjectIdentifier SqlQuery(string name)

Parameters

name string

The SQL query name.

Returns

StoreObjectIdentifier

The SQL query id.

Table(string, string)

Creates a table id.

public static StoreObjectIdentifier Table(string name, string schema)

Parameters

name string

The table name.

schema string

The table schema.

Returns

StoreObjectIdentifier

The table id.

ToString()

public override string ToString()

Returns

string

View(string, string)

Creates a view id.

public static StoreObjectIdentifier View(string name, string schema)

Parameters

name string

The view name.

schema string

The view schema.

Returns

StoreObjectIdentifier

The view id.

Operators

operator ==(StoreObjectIdentifier, StoreObjectIdentifier)

Compares one id to another id to see if they represent the same store object.

public static bool operator ==(StoreObjectIdentifier left, StoreObjectIdentifier right)

Parameters

left StoreObjectIdentifier

The first id.

right StoreObjectIdentifier

The second id.

Returns

bool

true if they represent the same store object; false otherwise.

operator !=(StoreObjectIdentifier, StoreObjectIdentifier)

Compares one id to another id to see if they represent the same store object.

public static bool operator !=(StoreObjectIdentifier left, StoreObjectIdentifier right)

Parameters

left StoreObjectIdentifier

The first id.

right StoreObjectIdentifier

The second id.

Returns

bool

false if they represent the same store object; true otherwise.