Table of Contents

Method GetKeys

Namespace
Innova.Data
Assembly
Innova.Data.dll

GetKeys<T>(DbContext, T)

Gets the primary keys for the specified entity.

public static PrimaryKeys<T> GetKeys<T>(this DbContext ctx, T entity) where T : class

Parameters

ctx DbContext

The DbContext instance.

entity T

The entity.

Returns

PrimaryKeys<T>

The primary keys as a PrimaryKeys instance.

Type Parameters

T

The type of the entity.

GetKeys<T>(DbContext, List<T>)

Gets the primary keys for the specified entities.

public static List<PrimaryKeys<T>> GetKeys<T>(this DbContext ctx, List<T> entities) where T : class

Parameters

ctx DbContext

The DbContext instance.

entities List<T>

The entities.

Returns

List<PrimaryKeys<T>>

The primary keys as a list of PrimaryKeys instances.

Type Parameters

T

The type of the entity.