Delen via


ConventionPropertyBaseExtensions Class

Definition

Caution

Use IConventionPropertyBase

Extension methods for IConventionPropertyBase.

public static class ConventionPropertyBaseExtensions
[System.Obsolete("Use IConventionPropertyBase")]
public static class ConventionPropertyBaseExtensions
type ConventionPropertyBaseExtensions = class
[<System.Obsolete("Use IConventionPropertyBase")>]
type ConventionPropertyBaseExtensions = class
Public Module ConventionPropertyBaseExtensions
Public Class ConventionPropertyBaseExtensions
Inheritance
ConventionPropertyBaseExtensions
Attributes

Methods

GetPropertyAccessModeConfigurationSource(IConventionPropertyBase)

Returns the configuration source for GetPropertyAccessMode().

SetField(IConventionPropertyBase, String, Boolean)

Sets the underlying CLR field that this property should use. This may be null for shadow properties or if the backing field for the property is not known.

Backing fields are normally found by convention as described here: http://go.microsoft.com/fwlink/?LinkId=723277. This method is useful for setting backing fields explicitly in cases where the correct field is not found by convention.

By default, the backing field, if one is found 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. This can be changed by calling SetPropertyAccessMode(IConventionPropertyBase, Nullable<PropertyAccessMode>, Boolean).

SetPropertyAccessMode(IConventionPropertyBase, Nullable<PropertyAccessMode>, Boolean)

Sets the PropertyAccessMode to use for this property.

Applies to