共用方式為


ConventionsConfiguration.Remove<TConvention> 方法

[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]

停用 DbModelBuilder 的慣例。 可供移除的預設慣例可以在 System.Data.Entity.ModelConfiguration.Conventions 命名空間中找到。

命名空間:  System.Data.Entity.ModelConfiguration.Configuration
組件:  EntityFramework (在 EntityFramework.dll 中)

語法

'宣告
<SuppressMessageAttribute("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")> _
Public Sub Remove(Of TConvention As IConvention)
'用途
Dim instance As ConventionsConfiguration

instance.Remove()
[SuppressMessageAttribute("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
public void Remove<TConvention>()
where TConvention : IConvention
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1004:GenericMethodsShouldProvideTypeParameter")]
public:
generic<typename TConvention>
where TConvention : IConvention 
void Remove()
[<SuppressMessageAttribute("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")>]
member Remove : unit -> unit   when 'TConvention : IConvention
JScript does not support generic types and methods.

類型參數

  • TConvention
    要停用之慣例的類型。

請參閱

參考

ConventionsConfiguration 類別

Remove 多載

System.Data.Entity.ModelConfiguration.Configuration 命名空間