IConventionModelBuilder.Ignore Method

Definition

Overloads

Ignore(String, Boolean)

Excludes the given entity type name from the model and prevents it from being added by convention.

Ignore(Type, Boolean)

Excludes the given entity type from the model and prevents it from being added by convention.

Ignore(String, Boolean)

Excludes the given entity type name from the model and prevents it from being added by convention.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder Ignore (string typeName, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder? Ignore (string typeName, bool fromDataAnnotation = false);
abstract member Ignore : string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder
Public Function Ignore (typeName As String, Optional fromDataAnnotation As Boolean = false) As IConventionModelBuilder

Parameters

typeName
String

The entity type name to be removed from the model.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

true if the given entity type name was ignored.

Applies to

Ignore(Type, Boolean)

Excludes the given entity type from the model and prevents it from being added by convention.

public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder Ignore (Type type, bool fromDataAnnotation = false);
public Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder? Ignore (Type type, bool fromDataAnnotation = false);
abstract member Ignore : Type * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionModelBuilder
Public Function Ignore (type As Type, Optional fromDataAnnotation As Boolean = false) As IConventionModelBuilder

Parameters

type
Type

The entity type to be removed from the model.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance so that additional configuration calls can be chained if the given entity type was ignored, null otherwise.

Applies to