Table of Contents

Class RuntimeServiceProperty

Namespace
Microsoft.EntityFrameworkCore.Metadata
Assembly
Microsoft.EntityFrameworkCore.dll

Represents a property on an entity type that represents an injected service from the DbContext.

public class RuntimeServiceProperty : RuntimePropertyBase, IRuntimePropertyBase, IServiceProperty, IReadOnlyServiceProperty, IPropertyBase, IReadOnlyPropertyBase, IAnnotatable, IReadOnlyAnnotatable
Inheritance
RuntimeServiceProperty
Implements
Inherited Members
Extension Methods

Remarks

See Modeling entity types and relationships for more information and examples.

Constructors

RuntimeServiceProperty(string, PropertyInfo?, FieldInfo?, Type, RuntimeEntityType, PropertyAccessMode)

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.

[EntityFrameworkInternal]
public RuntimeServiceProperty(string name, PropertyInfo? propertyInfo, FieldInfo? fieldInfo, Type serviceType, RuntimeEntityType declaringEntityType, PropertyAccessMode propertyAccessMode)

Parameters

name string
propertyInfo PropertyInfo
fieldInfo FieldInfo
serviceType Type
declaringEntityType RuntimeEntityType
propertyAccessMode PropertyAccessMode

Properties

ClrType

Gets the type of value that this property-like object holds.

protected override Type ClrType { get; }

Property Value

Type

DebugView

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.

[EntityFrameworkInternal]
public virtual DebugView DebugView { get; }

Property Value

DebugView

DeclaringEntityType

Gets the type that this property-like object belongs to.

public virtual RuntimeEntityType DeclaringEntityType { get; }

Property Value

RuntimeEntityType

DeclaringType

public override RuntimeTypeBase DeclaringType { get; }

Property Value

RuntimeTypeBase

ParameterBinding

The ServiceParameterBinding for this property.

public virtual ServiceParameterBinding ParameterBinding { get; set; }

Property Value

ServiceParameterBinding

Sentinel

public override object? Sentinel { get; }

Property Value

object

Methods

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.