MutableEntityTypeExtensions.AddProperty 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
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
屬性將保留的數值型別。
傳回
新建立的屬性。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應