語言

ConventionModelExtensions 類別

定義

警告

Use IConventionModel

的 IConventionModel擴展方法 。

public static class ConventionModelExtensions
[System.Obsolete("Use IConventionModel")]
public static class ConventionModelExtensions
type ConventionModelExtensions = class
[<System.Obsolete("Use IConventionModel")>]
type ConventionModelExtensions = class
Public Module ConventionModelExtensions
繼承
ConventionModelExtensions
屬性

方法

名稱 Description
AddIgnored(IConventionModel, Type, Boolean)
已淘汰.

標記給定的實體類型為忽略。

AddOwned(IConventionModel, Type, Boolean)
已淘汰.

標記該實體類型為擁有,表示發現該類型實體類型時應設定為擁有。

AddShared(IConventionModel, Type, Boolean)
已淘汰.

標記該實體類型為共享,表示發現匹配實體類型時應配置為共享類型實體類型。

FinalizeModel(IConventionModel)
已淘汰.

強制後處理模型,使其在執行時即可使用。 此後處理會在使用 OnModelCreating(ModelBuilder)時自動執行;此方法允許在無法自動執行的情況下明確執行。

FindEntityType(IConventionModel, Type, String, IConventionEntityType)
已淘汰.

取得名稱的實體類型,定義導航名稱及定義實體類型。 若未找到匹配實體類型,則回傳 null 。

FindEntityType(IConventionModel, Type)
已淘汰.

取得映射該實體類別的實體。 若未找到帶有該名稱的實體類型,則回傳 null 。

FindIgnoredConfigurationSource(IConventionModel, Type)
已淘汰.

表示是否忽略該實體類型。

FindIsOwnedConfigurationSource(IConventionModel, Type)
已淘汰.

回傳一個值,指示使用該類型實體類型時是否應被設定為擁有型別。

FindLeastDerivedEntityTypes(IConventionModel, Type, Func<IConventionEntityType,Boolean>)
已淘汰.

回傳對應給定中最微導型態的實體類型。

GetChangeTrackingStrategyConfigurationSource(IConventionModel)
已淘汰.

回傳 的 GetChangeTrackingStrategy(IModel)配置來源。

GetEntityTypes(IConventionModel, String)
已淘汰.

取得與名字相符的實體類型。

GetEntityTypes(IConventionModel, Type)
已淘汰.

取得與該類型相符的實體類型。

GetPropertyAccessModeConfigurationSource(IConventionModel)
已淘汰.

回傳 的 GetPropertyAccessMode(IModel)配置來源。

IsIgnored(IConventionModel, String)
已淘汰.

表示是否忽略給定的實體類型名稱。

IsIgnored(IConventionModel, Type)
已淘汰.

表示是否忽略該實體類型。

IsOwned(IConventionModel, Type)
已淘汰.

回傳一個值,指示使用該類型實體類型時是否應被設定為擁有型別。

RemoveEntityType(IConventionModel, String, String, IConventionEntityType)
已淘汰.

從模型中移除具有定義導覽的實體類型。

RemoveEntityType(IConventionModel, String)
已淘汰.

從模型中移除一個沒有定義導航的實體類型。

RemoveEntityType(IConventionModel, Type, String, IConventionEntityType)
已淘汰.

從模型中移除具有定義導覽的實體類型。

RemoveEntityType(IConventionModel, Type)
已淘汰.

從模型中移除一個實體類型。

RemoveOwned(IConventionModel, Type)
已淘汰.

移除給定的擁有型別,表示發現匹配的實體型別不應被設定為擁有型。

SetChangeTrackingStrategy(IConventionModel, Nullable<ChangeTrackingStrategy>, Boolean)
已淘汰.

設定模型中實體的預設變更追蹤策略。 此策略顯示上下文如何偵測某個實體類型實例的屬性變更。

SetPropertyAccessMode(IConventionModel, Nullable<PropertyAccessMode>, Boolean)
已淘汰.

設定 以 PropertyAccessMode 作為該模型中所有實體類型的屬性的使用。

請注意,個別實體類型可以覆寫此存取模式,而實體類型的個別屬性也能覆蓋該實體類型設定的存取模式。 此處設定的值將用於任何未指定覆寫的屬性。

適用於