ModelBuilder.Ignore Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Ignore(String) |
Excludes an entity type with the given name from the model. This method is typically used to remove types from the model that were added by convention. |
Ignore(Type) |
Excludes an entity type with given CLR type from the model. This method is typically used to remove types from the model that were added by convention. |
Ignore<TEntity>() |
Excludes the given entity type from the model. This method is typically used to remove types from the model that were added by convention. |
Ignore(String)
Excludes an entity type with the given name from the model. This method is typically used to remove types from the model that were added by convention.
public virtual Microsoft.EntityFrameworkCore.ModelBuilder Ignore (string typeName);
abstract member Ignore : string -> Microsoft.EntityFrameworkCore.ModelBuilder
override this.Ignore : string -> Microsoft.EntityFrameworkCore.ModelBuilder
Public Overridable Function Ignore (typeName As String) As ModelBuilder
Parameters
- typeName
- String
The name of the entity type to be removed from the model.
Returns
The same ModelBuilder instance so that additional configuration calls can be chained.
Remarks
See Modeling entity types for more information and examples.
Applies to
Ignore(Type)
Excludes an entity type with given CLR type from the model. This method is typically used to remove types from the model that were added by convention.
public virtual Microsoft.EntityFrameworkCore.ModelBuilder Ignore (Type type);
abstract member Ignore : Type -> Microsoft.EntityFrameworkCore.ModelBuilder
override this.Ignore : Type -> Microsoft.EntityFrameworkCore.ModelBuilder
Public Overridable Function Ignore (type As Type) As ModelBuilder
Parameters
- type
- Type
The entity type to be removed from the model.
Returns
The same ModelBuilder instance so that additional configuration calls can be chained.
Remarks
See Modeling entity types for more information and examples.
Applies to
Ignore<TEntity>()
Excludes the given entity type from the model. This method is typically used to remove types from the model that were added by convention.
public virtual Microsoft.EntityFrameworkCore.ModelBuilder Ignore<TEntity> () where TEntity : class;
abstract member Ignore : unit -> Microsoft.EntityFrameworkCore.ModelBuilder (requires 'Entity : null)
override this.Ignore : unit -> Microsoft.EntityFrameworkCore.ModelBuilder (requires 'Entity : null)
Public Overridable Function Ignore(Of TEntity As Class) () As ModelBuilder
Type Parameters
- TEntity
The entity type to be removed from the model.
Returns
The same ModelBuilder instance so that additional configuration calls can be chained.
Remarks
See Modeling entity types for more information and examples.
Applies to
Entity Framework