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
屬性

方法

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

將指定的實體類型標示為忽略。

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

將指定的實體類型標示為擁有,指出使用指定類型的探索到實體類型何時應設定為擁有。

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

將指定的實體類型標示為共用,指出探索到的相符實體類型應該設定為共用類型實體類型時。

FinalizeModel(IConventionModel)
已淘汰.

強制在模型上進行後處理,使其可供執行時間使用。 這個後置處理會在使用 OnModelCreating(ModelBuilder) 時自動發生;這個方法允許在無法自動執行的情況下明確執行。

FindEntityType(IConventionModel, Type)
已淘汰.

取得對應指定實體類別的實體。 null如果找不到具有指定名稱的實體類型,則傳回 。

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

取得指定名稱的實體類型,定義導覽名稱和定義實體類型。 如果找不到相符的實體類型,則傳 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)
已淘汰.

從模型移除實體類型,而不定義導覽。

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

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

RemoveEntityType(IConventionModel, Type)
已淘汰.

從模型移除實體類型。

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

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

RemoveOwned(IConventionModel, Type)
已淘汰.

移除指定的擁有類型,指出探索到的相符實體類型不應該設定為擁有。

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

設定要用於模型中實體的預設變更追蹤策略。 此策略指出內容如何偵測實體類型實例的屬性變更。

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

PropertyAccessMode設定要用於此模型中所有實體類型之屬性的 。

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

適用於