IMutableServiceProperty Interface
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.
A IReadOnlyPropertyBase in the Entity Framework model that represents an injected service from the DbContext.
public interface IMutableServiceProperty : Microsoft.EntityFrameworkCore.Metadata.IMutablePropertyBase, Microsoft.EntityFrameworkCore.Metadata.IServiceProperty
public interface IMutableServiceProperty : Microsoft.EntityFrameworkCore.Metadata.IMutablePropertyBase, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyServiceProperty
type IMutableServiceProperty = interface
interface IServiceProperty
interface IPropertyBase
interface IAnnotatable
interface IMutablePropertyBase
interface IMutableAnnotatable
type IMutableServiceProperty = interface
interface IReadOnlyServiceProperty
interface IReadOnlyPropertyBase
interface IReadOnlyAnnotatable
interface IMutablePropertyBase
interface IMutableAnnotatable
Public Interface IMutableServiceProperty
Implements IMutablePropertyBase, IServiceProperty
Public Interface IMutableServiceProperty
Implements IMutablePropertyBase, IReadOnlyServiceProperty
- Implements
Remarks
This interface is used during model creation and allows the metadata to be modified. Once the model is built, IServiceProperty represents a read-only view of the same metadata.
See Modeling entity types and relationships for more information and examples.
Properties
ClrType |
Gets the type of value that this property-like object holds. (Inherited from IReadOnlyPropertyBase) |
DeclaringEntityType |
Gets the type that this property belongs to. |
DeclaringType |
Gets the type that this property-like object belongs to. (Inherited from IReadOnlyPropertyBase) |
FieldInfo |
Gets the FieldInfo for the underlying CLR field for this property-like object.
This may be |
Item[String] |
Gets the value of the annotation with the given name, returning |
Name |
Gets the name of this property-like object. (Inherited from IReadOnlyPropertyBase) |
ParameterBinding |
Gets or sets ServiceParameterBinding for this property. |
PropertyInfo |
Gets the PropertyInfo for the underlying CLR property for this property-like object.
This may be |
Sentinel |
Gets the sentinel value that indicates that this property is not set. (Inherited from IReadOnlyPropertyBase) |
Methods
AddAnnotation(String, Object) |
Adds an annotation to this object. Throws if an annotation with the specified name already exists. (Inherited from IMutableAnnotatable) |
AddAnnotations(IEnumerable<IAnnotation>) |
Adds annotations to an object. (Inherited from IMutableAnnotatable) |
AddRuntimeAnnotation(String, Object) |
Adds a runtime annotation to this object. Throws if an annotation with the specified name already exists. (Inherited from IAnnotatable) |
AnnotationsToDebugString(Int32) |
Gets the debug string for all annotations declared on the object. (Inherited from IReadOnlyAnnotatable) |
FindAnnotation(String) |
Gets the annotation with the given name, returning |
FindRuntimeAnnotation(String) |
Gets the runtime annotation with the given name, returning |
FindRuntimeAnnotationValue(String) |
Gets the value of the runtime annotation with the given name, returning |
GetAnnotation(String) |
Gets the annotation with the given name, throwing if it does not exist. (Inherited from IReadOnlyAnnotatable) |
GetAnnotations() |
Gets all annotations on the current object. (Inherited from IReadOnlyAnnotatable) |
GetCurrentValueComparer() |
Gets a IComparer<T> for comparing values in tracked IUpdateEntry entries. (Inherited from IPropertyBase) |
GetFieldName() |
Gets the name of the backing field for this property, or |
GetGetter() |
Gets a IClrPropertyGetter for reading the value of this property. (Inherited from IPropertyBase) |
GetIndex() |
Gets the property index for this property. (Inherited from IPropertyBase) |
GetMemberInfo(Boolean, Boolean) |
Gets the PropertyInfo or FieldInfo that should be used to get or set a value for the given property. (Inherited from IPropertyBase) |
GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg) |
Gets the value of the runtime annotation with the given name, adding it if one does not exist. (Inherited from IAnnotatable) |
GetPropertyAccessMode() |
Gets the PropertyAccessMode being used for this property-like object. (Inherited from IReadOnlyPropertyBase) |
GetRuntimeAnnotations() |
Gets all the runtime annotations on the current object. (Inherited from IAnnotatable) |
IsIndexerProperty() |
Gets a value indicating whether this is an indexer property. An indexer property is one that is accessed through an indexer on the entity class. (Inherited from IReadOnlyPropertyBase) |
IsShadowProperty() |
Gets a value indicating whether this is a shadow property. A shadow property is one that does not have a corresponding property in the entity class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the entity class. (Inherited from IReadOnlyPropertyBase) |
RemoveAnnotation(String) |
Removes the given annotation from this object. (Inherited from IMutableAnnotatable) |
RemoveRuntimeAnnotation(String) |
Removes the given runtime annotation from this object. (Inherited from IAnnotatable) |
SetAnnotation(String, Object) |
Sets the annotation stored under the given key. Overwrites the existing annotation if an annotation with the specified name already exists. (Inherited from IMutableAnnotatable) |
SetField(String) |
Sets the underlying CLR field that this property should use. (Inherited from IMutablePropertyBase) |
SetOrRemoveAnnotation(String, Object) |
Sets the annotation stored under the given name. Overwrites the existing annotation if an
annotation with the specified name already exists. Removes the existing annotation if |
SetPropertyAccessMode(Nullable<PropertyAccessMode>) |
Sets the PropertyAccessMode to use for this property. (Inherited from IMutablePropertyBase) |
SetRuntimeAnnotation(String, Object) |
Sets the runtime annotation stored under the given key. Overwrites the existing annotation if an annotation with the specified name already exists. (Inherited from IAnnotatable) |
ToDebugString(MetadataDebugStringOptions, Int32) |
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. (Inherited from IReadOnlyServiceProperty) |
Extension Methods
AnnotationsToDebugString(IAnnotatable, Int32) |
Gets the debug string for all annotations declared on the object. |
GetAnnotation(IAnnotatable, String) |
Gets the annotation with the given name, throwing if it does not exist. |
AddAnnotations(IMutableAnnotatable, IEnumerable<IAnnotation>) |
Adds annotations to an object. |
GetAnnotation(IMutableAnnotatable, String) |
Gets the annotation with the given name, throwing if it does not exist. |
GetOrAddAnnotation(IMutableAnnotatable, String, String) |
Gets the existing annotation with a given key, or adds a new annotation if one does not exist. |
SetOrRemoveAnnotation(IMutableAnnotatable, String, Object) |
Sets the annotation stored under the given name. Overwrites the existing annotation if an
annotation with the specified name already exists. Removes the existing annotation if |
SetField(IMutablePropertyBase, String) |
Sets the underlying CLR field that this property should use. 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(IMutablePropertyBase, Nullable<PropertyAccessMode>). |
SetPropertyAccessMode(IMutablePropertyBase, Nullable<PropertyAccessMode>) |
Sets the PropertyAccessMode to use for this property. |
SetPropertyAccessMode(IMutablePropertyBase, Nullable<PropertyAccessMode>) |
Sets the PropertyAccessMode to use for this property. |
GetCurrentValueComparer(IPropertyBase) |
Gets a IComparer<T> for comparing values in tracked IUpdateEntry entries. |
GetFieldName(IPropertyBase) |
Gets the name of the backing field for this property, or |
GetGetter(IPropertyBase) |
Gets a IClrPropertyGetter for reading the value of this property. Note that it is an error to call this method for a shadow property (IsShadowProperty(IPropertyBase)) since such a property has no associated MemberInfo. |
GetIndex(IPropertyBase) |
Gets the property index for this property. |
GetMemberInfo(IPropertyBase, Boolean, Boolean) |
Gets the PropertyInfo or FieldInfo that should be used to get or set a value for the given property. Note that it is an error to call this method for a shadow property (IsShadowProperty(IPropertyBase)) since such a property has no associated MemberInfo. |
GetPropertyAccessMode(IPropertyBase) |
Gets the PropertyAccessMode being used for this property.
|
IsIndexerProperty(IPropertyBase) |
Gets a value indicating whether this is an indexer property. An indexer property is one that is accessed through an indexer on the entity class. |
IsShadowProperty(IPropertyBase) |
Obsolete.
Gets a value indicating whether this is a shadow property. A shadow property is one that does not have a corresponding property in the entity class. The current value for the property is stored in the ChangeTracker rather than being stored in instances of the entity class. |
ToDebugString(IServiceProperty, MetadataDebugStringOptions, Int32) |
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. |
Applies to
Entity Framework