EntityTypeBuilder<TEntity>.UsePropertyAccessMode 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
UsePropertyAccessMode(PropertyAccessMode) |
Sets the PropertyAccessMode to use for all properties of this entity type. By default, the backing field, if one is found by convention or has been specified, is used when new objects are constructed, typically when entities are queried from the database. Properties are used for all other accesses. Calling this method witll change that behavior for all properties of this entity type as described in the PropertyAccessMode enum. Calling this method overrrides for all properties of this entity type any access mode that was set on the model. |
UsePropertyAccessMode(PropertyAccessMode) |
Sets the PropertyAccessMode to use for all properties of this entity type. |
UsePropertyAccessMode(PropertyAccessMode)
Sets the PropertyAccessMode to use for all properties of this entity type.
By default, the backing field, if one is found by convention or has been specified, is used when new objects are constructed, typically when entities are queried from the database. Properties are used for all other accesses. Calling this method witll change that behavior for all properties of this entity type as described in the PropertyAccessMode enum.
Calling this method overrrides for all properties of this entity type any access mode that was set on the model.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> UsePropertyAccessMode (Microsoft.EntityFrameworkCore.Metadata.PropertyAccessMode propertyAccessMode);
override this.UsePropertyAccessMode : Microsoft.EntityFrameworkCore.Metadata.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)>
Public Overridable Function UsePropertyAccessMode (propertyAccessMode As PropertyAccessMode) As EntityTypeBuilder(Of TEntity)
Parameters
- propertyAccessMode
- PropertyAccessMode
The PropertyAccessMode to use for properties of this entity type.
Returns
The same builder instance so that multiple configuration calls can be chained.
Applies to
UsePropertyAccessMode(PropertyAccessMode)
- Source:
- EntityTypeBuilder%60.cs
- Source:
- EntityTypeBuilder%60.cs
- Source:
- EntityTypeBuilder%60.cs
- Source:
- EntityTypeBuilder%60.cs
- Source:
- EntityTypeBuilder%60.cs
- Source:
- EntityTypeBuilder%60.cs
- Source:
- EntityTypeBuilder%60.cs
- Source:
- EntityTypeBuilder%60.cs
- Source:
- EntityTypeBuilder%60.cs
Sets the PropertyAccessMode to use for all properties of this entity type.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<TEntity> UsePropertyAccessMode (Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode);
override this.UsePropertyAccessMode : Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.Builders.EntityTypeBuilder<'Entity (requires 'Entity : null)>
Public Overridable Function UsePropertyAccessMode (propertyAccessMode As PropertyAccessMode) As EntityTypeBuilder(Of TEntity)
Parameters
- propertyAccessMode
- PropertyAccessMode
The PropertyAccessMode to use for properties of this entity type.
Returns
The same builder instance so that multiple configuration calls can be chained.
Remarks
By default, the backing field, if one is found by convention or has been specified, is used when new objects are constructed, typically when entities are queried from the database. Properties are used for all other accesses. Calling this method will change that behavior for all properties of this entity type as described in the PropertyAccessMode enum.
Calling this method overrides for all properties of this entity type any access mode that was set on the model.
Applies to
Entity Framework