Class ViewColumnBuilder
- Namespace
- Microsoft.EntityFrameworkCore.Metadata.Builders
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Instances of this class are returned from methods when using the Microsoft.EntityFrameworkCore.ModelBuilder API and it is not designed to be directly constructed in your application code.
public class ViewColumnBuilder : IInfrastructure<PropertyBuilder>
- Inheritance
-
ViewColumnBuilder
- Implements
-
IInfrastructure<PropertyBuilder>
- Derived
- Inherited Members
Constructors
ViewColumnBuilder(in StoreObjectIdentifier, PropertyBuilder)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public ViewColumnBuilder(in StoreObjectIdentifier storeObject, PropertyBuilder propertyBuilder)
Parameters
storeObject
StoreObjectIdentifierpropertyBuilder
PropertyBuilder
Properties
InternalOverrides
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
protected virtual RelationalPropertyOverrides InternalOverrides { get; }
Property Value
Overrides
The view-specific overrides being configured.
public virtual IMutableRelationalPropertyOverrides Overrides { get; }
Property Value
Methods
HasAnnotation(string, object?)
Adds or updates an annotation on the property for a specific view.
If an annotation with the key specified in annotation
already exists, its value will be updated.
public virtual ViewColumnBuilder HasAnnotation(string annotation, object? value)
Parameters
annotation
stringThe key of the annotation to be added or updated.
value
objectThe value to be stored in the annotation.
Returns
- ViewColumnBuilder
The same builder instance so that multiple configuration calls can be chained.
HasColumnName(string?)
Configures the column that the property maps to when targeting a relational database.
public virtual ViewColumnBuilder HasColumnName(string? name)
Parameters
name
stringThe name of the column.
Returns
- ViewColumnBuilder
The same builder instance so that multiple calls can be chained.
Remarks
See Modeling entity types and relationships for more information and examples.