Interface IRelationalModel
- Namespace
- Microsoft.EntityFrameworkCore.Metadata
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Represents a relational database.
public interface IRelationalModel : IAnnotatable, IReadOnlyAnnotatable
Remarks
See Modeling entity types and relationships for more information and examples.
Properties
Collation
Returns the database collation.
string? Collation { get; }
Property Value
Functions
Returns all user-defined functions contained in the model.
IEnumerable<IStoreFunction> Functions { get; }
Property Value
Model
Gets the full model.
IModel Model { get; }
Property Value
- IModel
Queries
Returns all the SQL queries mapped in the model.
IEnumerable<ISqlQuery> Queries { get; }
Property Value
- IEnumerable<ISqlQuery>
All the SQL queries mapped in the model.
Sequences
Returns all sequences contained in the model.
IEnumerable<ISequence> Sequences { get; }
Property Value
StoredProcedures
Returns all stored procedures contained in the model.
IEnumerable<IStoreStoredProcedure> StoredProcedures { get; }
Property Value
Tables
Returns all the tables mapped in the model.
IEnumerable<ITable> Tables { get; }
Property Value
Views
Returns all the views mapped in the model.
IEnumerable<IView> Views { get; }
Property Value
- IEnumerable<IView>
All the views mapped in the model.
Methods
FindFunction(string, string?, IReadOnlyList<string>)
Finds a IStoreFunction with the given signature.
IStoreFunction? FindFunction(string name, string? schema, IReadOnlyList<string> parameters)
Parameters
name
stringThe name of the function.
schema
stringThe schema of the function.
parameters
IReadOnlyList<string>A list of parameter types.
Returns
- IStoreFunction
The IStoreFunction or null if no function with the given name was found.
FindQuery(string)
Gets the SQL query with the given name. Returns null if no SQL query with the given name is defined.
ISqlQuery? FindQuery(string name)
Parameters
name
stringThe name of the SQL query.
Returns
FindSequence(string, string?)
Finds an ISequence with the given name.
ISequence? FindSequence(string name, string? schema)
Parameters
Returns
FindStoredProcedure(string, string?)
Finds a IStoreStoredProcedure with the name.
IStoreStoredProcedure? FindStoredProcedure(string name, string? schema)
Parameters
Returns
- IStoreStoredProcedure
The IStoreStoredProcedure or null if no stored procedure with the given name was found.
FindTable(string, string?)
Gets the table with the given name. Returns null if no table with the given name is defined.
ITable? FindTable(string name, string? schema)
Parameters
Returns
FindView(string, string?)
Gets the view with the given name. Returns null if no view with the given name is defined.
IView? FindView(string name, string? schema)
Parameters
Returns
ToDebugString(MetadataDebugStringOptions, int)
Creates a human-readable representation of the given metadata.
Warning: Do not rely on the format of the returned string. It is designed for debugging only and may change arbitrarily between releases.
string ToDebugString(MetadataDebugStringOptions options = 0, int indent = 0)
Parameters
options
MetadataDebugStringOptionsOptions for generating the string.
indent
intThe number of indent spaces to use before each new line.
Returns
- string
A human-readable representation.