Table of Contents

Class DbContextExtensions

Namespace
Innova.Data
Assembly
Innova.Data.dll

Extension methods for DbContext.

public static class DbContextExtensions
Inheritance
DbContextExtensions

Methods

ConvertToSqlKeys<T>(DbContext, IPrimaryKey)

Converts the primary keys to SQL primary keys.

ConvertToSqlParameter(DbContext, IPrimaryKey)

Converts the primary keys to a list of SqlParameters.

GetColumnName<TEntity>(DbContext, Expression<Func<TEntity, object>>)

Resolves the column name from the entity model based on the property selector.

GetColumnName<TEntity>(DbContext, string)
GetKeyNames<T>(DbContext)

Gets the names of the primary keys for the specified entity type.

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

Gets the primary keys for the specified entities.

GetKeys<T>(DbContext, T)

Gets the primary keys for the specified entity.

GetPrimaryKey(DbContext, Type, string)

Gets the primary key for the specified entity type and key string.

GetPrimaryKeysSelector<T>(DbContext)

Gets the primary keys selector expression for the specified entity type.

GetSqlKeys<T>(DbContext, T)

Gets the SQL primary keys for the specified entity.

GetTableName<TEntity>(DbContext)

Gets the fully qualified table name (including schema) for the specified entity type.

RawSql<T>(DbContext, string, params KeyValuePair<string, object>[])

Executes a raw SQL query and maps the result to a list of objects.

Set(DbContext, Type)

Gets a queryable set for the specified entity type.