Table of Contents

Class RelationalTriggerBuilderExtensions

Namespace
Microsoft.EntityFrameworkCore
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

Relational database specific extension methods for Microsoft.EntityFrameworkCore.Metadata.Builders.TriggerBuilder.

public static class RelationalTriggerBuilderExtensions
Inheritance
RelationalTriggerBuilderExtensions
Inherited Members

Remarks

See Database triggers for more information and examples.

Methods

CanSetDatabaseName(IConventionTriggerBuilder, string?, bool)

Returns a value indicating whether the given name can be set for the trigger.

public static bool CanSetDatabaseName(this IConventionTriggerBuilder triggerBuilder, string? name, bool fromDataAnnotation = false)

Parameters

triggerBuilder IConventionTriggerBuilder

The builder for the trigger being configured.

name string

The database name of the trigger.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

bool

true if the database name can be set for the trigger.

CanSetTableName(IConventionTriggerBuilder, string?, bool)

Returns a value indicating whether the given table name can be set for the trigger.

public static bool CanSetTableName(this IConventionTriggerBuilder triggerBuilder, string? name, bool fromDataAnnotation = false)

Parameters

triggerBuilder IConventionTriggerBuilder

The builder for the trigger being configured.

name string

The name of the table on which this trigger is defined.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

bool

true if the table name can be set for the trigger.

CanSetTableSchema(IConventionTriggerBuilder, string?, bool)

Returns a value indicating whether the given table schema can be set for the trigger.

public static bool CanSetTableSchema(this IConventionTriggerBuilder triggerBuilder, string? schema, bool fromDataAnnotation = false)

Parameters

triggerBuilder IConventionTriggerBuilder

The builder for the trigger being configured.

schema string

The schema of the table on which this trigger is defined.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

bool

true if the database name can be set for the trigger.

HasDatabaseName(IConventionTriggerBuilder, string?, bool)

Sets the database name of the trigger.

public static IConventionTriggerBuilder? HasDatabaseName(this IConventionTriggerBuilder triggerBuilder, string? name, bool fromDataAnnotation = false)

Parameters

triggerBuilder IConventionTriggerBuilder

The builder for the trigger being configured.

name string

The database name of the trigger.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

IConventionTriggerBuilder

The same builder instance if the configuration was applied, null otherwise.

HasTableName(IConventionTriggerBuilder, string?, bool)

Sets name of the table on which this trigger is defined.

public static IConventionTriggerBuilder? HasTableName(this IConventionTriggerBuilder triggerBuilder, string? name, bool fromDataAnnotation = false)

Parameters

triggerBuilder IConventionTriggerBuilder

The builder for the trigger being configured.

name string

The name of the table on which this trigger is defined.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

IConventionTriggerBuilder

The same builder instance if the configuration was applied, null otherwise.

HasTableSchema(IConventionTriggerBuilder, string?, bool)

Sets the schema of the table on which this trigger is defined.

public static IConventionTriggerBuilder? HasTableSchema(this IConventionTriggerBuilder triggerBuilder, string? schema, bool fromDataAnnotation = false)

Parameters

triggerBuilder IConventionTriggerBuilder

The builder for the trigger being configured.

schema string

The schema of the table on which this trigger is defined.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

IConventionTriggerBuilder

The same builder instance if the configuration was applied, null otherwise.