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

Remarks

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

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(IReadOnlyEntityType, StoreObjectType)

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

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

Parameters

entityType IReadOnlyEntityType

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.

DeleteStoredProcedure(string, string?)

Creates a delete stored procedure id.

public static StoreObjectIdentifier DeleteStoredProcedure(string name, string? schema = null)

Parameters

name string

The stored procedure name.

schema string

The stored procedure schema.

Returns

StoreObjectIdentifier

The stored procedure 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

InsertStoredProcedure(string, string?)

Creates an insert stored procedure id.

public static StoreObjectIdentifier InsertStoredProcedure(string name, string? schema = null)

Parameters

name string

The stored procedure name.

schema string

The stored procedure schema.

Returns

StoreObjectIdentifier

The stored procedure id.

SqlQuery(IReadOnlyEntityType)

Creates an id for the SQL query mapped using .

public static StoreObjectIdentifier SqlQuery(IReadOnlyEntityType entityType)

Parameters

entityType IReadOnlyEntityType

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 = null)

Parameters

name string

The table name.

schema string

The table schema.

Returns

StoreObjectIdentifier

The table id.

ToString()

public override string ToString()

Returns

string

UpdateStoredProcedure(string, string?)

Creates an update stored procedure id.

public static StoreObjectIdentifier UpdateStoredProcedure(string name, string? schema = null)

Parameters

name string

The stored procedure name.

schema string

The stored procedure schema.

Returns

StoreObjectIdentifier

The stored procedure id.

View(string, string?)

Creates a view id.

public static StoreObjectIdentifier View(string name, string? schema = null)

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.