次の方法で共有


RuntimeEntityType.AddServiceProperty メソッド

定義

オーバーロード

AddServiceProperty(String, PropertyInfo, FieldInfo, PropertyAccessMode)

このエンティティ型にサービス プロパティを追加します。

AddServiceProperty(String, PropertyInfo, FieldInfo, Type, PropertyAccessMode)

このエンティティ型にサービス プロパティを追加します。

AddServiceProperty(String, PropertyInfo, FieldInfo, PropertyAccessMode)

このエンティティ型にサービス プロパティを追加します。

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty AddServiceProperty (string name, System.Reflection.PropertyInfo? propertyInfo = default, System.Reflection.FieldInfo? fieldInfo = default, Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField);
abstract member AddServiceProperty : string * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty
override this.AddServiceProperty : string * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty
Public Overridable Function AddServiceProperty (name As String, Optional propertyInfo As PropertyInfo = Nothing, Optional fieldInfo As FieldInfo = Nothing, Optional propertyAccessMode As PropertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField) As RuntimeServiceProperty

パラメーター

name
String

追加するプロパティの名前。

propertyInfo
PropertyInfo

対応する CLR プロパティまたは null シャドウ プロパティ。

fieldInfo
FieldInfo

対応する CLR フィールドまたは null シャドウ プロパティ。

propertyAccessMode
PropertyAccessMode

PropertyAccessModeこのプロパティに使用される 。

戻り値

新しく作成されたサービス プロパティ。

適用対象

AddServiceProperty(String, PropertyInfo, FieldInfo, Type, PropertyAccessMode)

このエンティティ型にサービス プロパティを追加します。

public virtual Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty AddServiceProperty (string name, System.Reflection.PropertyInfo? propertyInfo = default, System.Reflection.FieldInfo? fieldInfo = default, Type? serviceType = default, Microsoft.EntityFrameworkCore.PropertyAccessMode propertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField);
abstract member AddServiceProperty : string * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Type * Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty
override this.AddServiceProperty : string * System.Reflection.PropertyInfo * System.Reflection.FieldInfo * Type * Microsoft.EntityFrameworkCore.PropertyAccessMode -> Microsoft.EntityFrameworkCore.Metadata.RuntimeServiceProperty
Public Overridable Function AddServiceProperty (name As String, Optional propertyInfo As PropertyInfo = Nothing, Optional fieldInfo As FieldInfo = Nothing, Optional serviceType As Type = Nothing, Optional propertyAccessMode As PropertyAccessMode = Microsoft.EntityFrameworkCore.PropertyAccessMode.PreferField) As RuntimeServiceProperty

パラメーター

name
String

追加するプロパティの名前。

propertyInfo
PropertyInfo

対応する CLR プロパティまたは null シャドウ プロパティ。

fieldInfo
FieldInfo

対応する CLR フィールドまたは null シャドウ プロパティ。

serviceType
Type

サービスの型。メンバー null の型を使用する場合は 。

propertyAccessMode
PropertyAccessMode

PropertyAccessModeこのプロパティに使用される 。

戻り値

新しく作成されたサービス プロパティ。

適用対象