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
Schema
Gets the table-like store object schema.
public string Schema { get; }
Property Value
StoreObjectType
Gets the table-like store object type.
public StoreObjectType StoreObjectType { get; }
Property Value
Methods
CompareTo(StoreObjectIdentifier)
public int CompareTo(StoreObjectIdentifier other)
Parameters
otherStoreObjectIdentifier
Returns
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
entityTypeIEntityTypeThe entity type.
typeStoreObjectTypeThe store object type.
Returns
- StoreObjectIdentifier?
The store object id.
DbFunction(string)
Creates a function id.
public static StoreObjectIdentifier DbFunction(string modelName)
Parameters
modelNamestringThe function model name.
Returns
- StoreObjectIdentifier
The function id.
DisplayName()
Gets the friendly display name for the store object.
public string DisplayName()
Returns
Equals(StoreObjectIdentifier)
public bool Equals(StoreObjectIdentifier other)
Parameters
otherStoreObjectIdentifier
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
SqlQuery(IEntityType)
Creates an id for the SQL query mapped using RelationalEntityTypeBuilderExtensions.ToSqlQuery.
public static StoreObjectIdentifier SqlQuery(IEntityType entityType)
Parameters
entityTypeIEntityTypeThe entity type.
Returns
- StoreObjectIdentifier
The SQL query id.
SqlQuery(string)
Creates a SQL query id.
public static StoreObjectIdentifier SqlQuery(string name)
Parameters
namestringThe 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
Returns
- StoreObjectIdentifier
The table id.
ToString()
public override string ToString()
Returns
View(string, string)
Creates a view id.
public static StoreObjectIdentifier View(string name, string schema)
Parameters
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
leftStoreObjectIdentifierThe first id.
rightStoreObjectIdentifierThe second id.
Returns
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
leftStoreObjectIdentifierThe first id.
rightStoreObjectIdentifierThe second id.