共用方式為


ConventionsConfiguration.AddAfter<TExistingConvention> 方法

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

啟用 DbModelBuilder 的慣例。 此慣例會在所指定的慣例之後執行。

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

語法

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

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

類型參數

  • TExistingConvention
    啟用的慣例會在其後執行之慣例的類型。

參數

請參閱

參考

ConventionsConfiguration 類別

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