QueryTypeBuilder.Property Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Property(String) |
Returns an object that can be used to configure a property of the query type. If no property with the given name exists, then a new property will be added. When adding a new property with this overload the property name must match the name of a CLR property or field on the query type. This overload cannot be used to add a new shadow state property. |
Property(Type, String) |
Returns an object that can be used to configure a property of the query type. If no property with the given name exists, then a new property will be added. When adding a new property, if a property with the same name exists in the query type class then it will be added to the model. If no property exists in the query type class, then a new shadow state property will be added. A shadow state property is one that does not have a corresponding property in the query type class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the query type class. |
Property<TProperty>(String) |
Returns an object that can be used to configure a property of the query type. If no property with the given name exists, then a new property will be added. When adding a new property, if a property with the same name exists in the query type class then it will be added to the model. If no property exists in the query type class, then a new shadow state property will be added. A shadow state property is one that does not have a corresponding property in the query type class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the query type class. |
Property(String)
Returns an object that can be used to configure a property of the query type. If no property with the given name exists, then a new property will be added.
When adding a new property with this overload the property name must match the name of a CLR property or field on the query type. This overload cannot be used to add a new shadow state property.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder Property (string propertyName);
abstract member Property : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
override this.Property : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
Public Overridable Function Property (propertyName As String) As PropertyBuilder
Parameters
- propertyName
- String
The name of the property to be configured.
Returns
An object that can be used to configure the property.
Applies to
Property(Type, String)
Returns an object that can be used to configure a property of the query type. If no property with the given name exists, then a new property will be added.
When adding a new property, if a property with the same name exists in the query type class then it will be added to the model. If no property exists in the query type class, then a new shadow state property will be added. A shadow state property is one that does not have a corresponding property in the query type class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the query type class.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder Property (Type propertyType, string propertyName);
abstract member Property : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
override this.Property : Type * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
Public Overridable Function Property (propertyType As Type, propertyName As String) As PropertyBuilder
Parameters
- propertyType
- Type
The type of the property to be configured.
- propertyName
- String
The name of the property to be configured.
Returns
An object that can be used to configure the property.
Applies to
Property<TProperty>(String)
Returns an object that can be used to configure a property of the query type. If no property with the given name exists, then a new property will be added.
When adding a new property, if a property with the same name exists in the query type class then it will be added to the model. If no property exists in the query type class, then a new shadow state property will be added. A shadow state property is one that does not have a corresponding property in the query type class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the query type class.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> Property<TProperty> (string propertyName);
abstract member Property : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
override this.Property : string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
Public Overridable Function Property(Of TProperty) (propertyName As String) As PropertyBuilder(Of TProperty)
Type Parameters
- TProperty
The type of the property to be configured.
Parameters
- propertyName
- String
The name of the property to be configured.
Returns
An object that can be used to configure the property.
Applies to
Entity Framework