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
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(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
entityTypeIReadOnlyEntityTypeThe 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.
DeleteStoredProcedure(string, string?)
Creates a delete stored procedure id.
public static StoreObjectIdentifier DeleteStoredProcedure(string name, string? schema = null)
Parameters
Returns
- StoreObjectIdentifier
The stored procedure 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
InsertStoredProcedure(string, string?)
Creates an insert stored procedure id.
public static StoreObjectIdentifier InsertStoredProcedure(string name, string? schema = null)
Parameters
Returns
- StoreObjectIdentifier
The stored procedure id.
SqlQuery(IReadOnlyEntityType)
Creates an id for the SQL query mapped using
public static StoreObjectIdentifier SqlQuery(IReadOnlyEntityType entityType)
Parameters
entityTypeIReadOnlyEntityTypeThe 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 = null)
Parameters
Returns
- StoreObjectIdentifier
The table id.
ToString()
public override string ToString()
Returns
UpdateStoredProcedure(string, string?)
Creates an update stored procedure id.
public static StoreObjectIdentifier UpdateStoredProcedure(string name, string? schema = null)
Parameters
Returns
- StoreObjectIdentifier
The stored procedure id.
View(string, string?)
Creates a view id.
public static StoreObjectIdentifier View(string name, string? schema = null)
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.