Table of Contents

Class NpgsqlEntityTypeExtensions

Namespace
Microsoft.EntityFrameworkCore
Assembly
Npgsql.EntityFrameworkCore.PostgreSQL.dll

Extension methods for IEntityType for Npgsql-specific metadata.

public static class NpgsqlEntityTypeExtensions
Inheritance
NpgsqlEntityTypeExtensions
Inherited Members

Methods

GetCockroachDbInterleaveInParent(IReadOnlyEntityType)

Gets the CockroachDB-specific interleave-in-parent setting for the table to which the entity is mapped.

public static CockroachDbInterleaveInParent GetCockroachDbInterleaveInParent(this IReadOnlyEntityType entityType)

Parameters

entityType IReadOnlyEntityType

Returns

CockroachDbInterleaveInParent

GetIsUnlogged(IReadOnlyEntityType)

Gets whether the table to which the entity is mapped is unlogged.

public static bool GetIsUnlogged(this IReadOnlyEntityType entityType)

Parameters

entityType IReadOnlyEntityType

Returns

bool

GetIsUnloggedConfigurationSource(IConventionEntityType)

Gets the configuration source for whether the table to which the entity is mapped is unlogged.

public static ConfigurationSource? GetIsUnloggedConfigurationSource(this IConventionEntityType index)

Parameters

index IConventionEntityType

Returns

ConfigurationSource?

GetStorageParameter(IEntityType, string)

Gets a storage parameter for the table mapped to the entity type.

public static string? GetStorageParameter(this IEntityType entityType, string parameterName)

Parameters

entityType IEntityType
parameterName string

Returns

string

GetStorageParameterConfigurationSource(IConventionEntityType, string)

Gets the configuration source for a storage parameter for the table mapped to the entity type.

public static ConfigurationSource? GetStorageParameterConfigurationSource(this IConventionEntityType index, string parameterName)

Parameters

index IConventionEntityType
parameterName string

Returns

ConfigurationSource?

GetStorageParameters(IReadOnlyEntityType)

Gets all storage parameters for the table mapped to the entity type.

public static Dictionary<string, object?> GetStorageParameters(this IReadOnlyEntityType entityType)

Parameters

entityType IReadOnlyEntityType

Returns

Dictionary<string, object>

SetIsUnlogged(IConventionEntityType, bool, bool)

Sets whether the table to which the entity is mapped is unlogged.

public static bool SetIsUnlogged(this IConventionEntityType entityType, bool unlogged, bool fromDataAnnotation = false)

Parameters

entityType IConventionEntityType
unlogged bool
fromDataAnnotation bool

Returns

bool

SetIsUnlogged(IMutableEntityType, bool)

Sets whether the table to which the entity is mapped is unlogged.

public static void SetIsUnlogged(this IMutableEntityType entityType, bool unlogged)

Parameters

entityType IMutableEntityType
unlogged bool

SetStorageParameter(IConventionEntityType, string, object?, bool)

Sets a storage parameter on the table mapped to the entity type.

public static object SetStorageParameter(this IConventionEntityType entityType, string parameterName, object? parameterValue, bool fromDataAnnotation = false)

Parameters

entityType IConventionEntityType
parameterName string
parameterValue object
fromDataAnnotation bool

Returns

object

SetStorageParameter(IMutableEntityType, string, object?)

Sets a storage parameter on the table mapped to the entity type.

public static void SetStorageParameter(this IMutableEntityType entityType, string parameterName, object? parameterValue)

Parameters

entityType IMutableEntityType
parameterName string
parameterValue object