Table of Contents

Interface IRelationalModel

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

Represents a relational database.

public interface IRelationalModel : IAnnotatable
Extension Methods

Properties

Collation

Returns the database collation.

string Collation { get; }

Property Value

string

Functions

Returns all user-defined functions contained in the model.

IEnumerable<IStoreFunction> Functions { get; }

Property Value

IEnumerable<IStoreFunction>

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

IEnumerable<ISequence>

Tables

Returns all the tables mapped in the model.

IEnumerable<ITable> Tables { get; }

Property Value

IEnumerable<ITable>

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 string

The name of the function.

schema string

The 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 defined.

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 string

The name of the SQL query.

Returns

ISqlQuery

The SQL query with a given name or null if no SQL query with the given name is defined.

FindSequence(string, string)

Finds an ISequence with the given name.

ISequence FindSequence(string name, string schema)

Parameters

name string

The sequence name.

schema string

The schema that contains the sequence.

Returns

ISequence

The ISequence or null if no sequence with the given name in the given schema 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

name string

The name of the table.

schema string

The schema of the table.

Returns

ITable

The table with a given name or null if no table with the given name is defined.

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

name string

The name of the view.

schema string

The schema of the view.

Returns

IView

The view with a given name or null if no view with the given name is defined.