Interface IView
- Namespace
- Microsoft.EntityFrameworkCore.Metadata
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Represents a view in the database.
public interface IView : ITableBase, IAnnotatable, IReadOnlyAnnotatable
- Inherited Members
Remarks
See Modeling entity types and relationships for more information and examples.
Properties
Columns
Gets the columns defined for this view.
IEnumerable<IViewColumn> Columns { get; }
Property Value
EntityTypeMappings
Gets the entity type mappings.
IEnumerable<IViewMapping> EntityTypeMappings { get; }
Property Value
ViewDefinitionSql
Gets the view definition or null if this view is not managed by migrations.
string? ViewDefinitionSql { get; }
Property Value
Methods
FindColumn(IProperty)
Gets the column mapped to the given property. Returns null if no column is mapped to the given property.
IViewColumn? FindColumn(IProperty property)
Parameters
property
IProperty
Returns
FindColumn(string)
Gets the column with the given name. Returns null if no column with the given name is defined.
IViewColumn? FindColumn(string name)
Parameters
name
string
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.