MutableEntityTypeExtensions.AddProperty 方法

定義

多載

AddProperty(IMutableEntityType, MemberInfo)

將屬性加入至這個實體類型。

AddProperty(IMutableEntityType, PropertyInfo)

將屬性加入至此實體。

AddProperty(IMutableEntityType, String)

將屬性加入至這個實體類型。

AddProperty(IMutableEntityType, String, Type)

將屬性加入至這個實體類型。

AddProperty(IMutableEntityType, MemberInfo)

將屬性加入至這個實體類型。

public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Reflection.MemberInfo memberInfo);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Reflection.MemberInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function AddProperty (entityType As IMutableEntityType, memberInfo As MemberInfo) As IMutableProperty

參數

entityType
IMutableEntityType

實體類型。

memberInfo
MemberInfo

實體類別上的對應成員。

傳回

新建立的屬性。

適用於

AddProperty(IMutableEntityType, PropertyInfo)

將屬性加入至此實體。

public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Reflection.PropertyInfo propertyInfo);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Reflection.PropertyInfo -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function AddProperty (entityType As IMutableEntityType, propertyInfo As PropertyInfo) As IMutableProperty

參數

entityType
IMutableEntityType

要加入屬性的實體類型。

propertyInfo
PropertyInfo

實體類別中的對應屬性。

傳回

新建立的屬性。

適用於

AddProperty(IMutableEntityType, String)

將屬性加入至這個實體類型。

public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string name);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * string -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function AddProperty (entityType As IMutableEntityType, name As String) As IMutableProperty

參數

entityType
IMutableEntityType

實體類型。

name
String

要加入的屬性名稱。

傳回

新建立的屬性。

適用於

AddProperty(IMutableEntityType, String, Type)

將屬性加入至這個實體類型。

public static Microsoft.EntityFrameworkCore.Metadata.IMutableProperty AddProperty (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, string name, Type propertyType);
static member AddProperty : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * string * Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableProperty
<Extension()>
Public Function AddProperty (entityType As IMutableEntityType, name As String, propertyType As Type) As IMutableProperty

參數

entityType
IMutableEntityType

實體類型。

name
String

要加入的屬性名稱。

propertyType
Type

屬性將保留的數值型別。

傳回

新建立的屬性。

適用於