DbModelBuilder.Ignore<T> Method

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

Excludes a type from the model. This is used to remove types from the model that were added by convention during initial model discovery.

Namespace:  System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

Syntax

'Declaration
<SuppressMessageAttribute("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")> _
Public Overridable Function Ignore(Of T As Class) As DbModelBuilder
'Usage
Dim instance As DbModelBuilder 
Dim returnValue As DbModelBuilder 

returnValue = instance.Ignore()
[SuppressMessageAttribute("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")]
public virtual DbModelBuilder Ignore<T>()
where T : class
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1004:GenericMethodsShouldProvideTypeParameter")]
public:
generic<typename T>
where T : ref class 
virtual DbModelBuilder^ Ignore()
[<SuppressMessageAttribute("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")>]
abstract Ignore : unit -> DbModelBuilder   when 'T : not struct
[<SuppressMessageAttribute("Microsoft.Design", "CA1004:GenericMethodsShouldProvideTypeParameter")>]
override Ignore : unit -> DbModelBuilder   when 'T : not struct
JScript does not support generic types and methods.

Type Parameters

  • T
    The type to be excluded.

Return Value

Type: System.Data.Entity.DbModelBuilder
The same DbModelBuilder instance so that multiple calls can be chained.

See Also

Reference

DbModelBuilder Class

Ignore Overload

System.Data.Entity Namespace