Interface ISqlContext
Specifies the Sql context.
Namespace: Umbraco.Cms.Infrastructure.Persistence
Assembly: Umbraco.Infrastructure.dll
Syntax
public interface ISqlContext
Properties
View SourceDatabaseType
Gets the database type.
Declaration
DatabaseType DatabaseType { get; }
Property Value
| Type | Description |
|---|---|
| DatabaseType |
Mappers
Gets the mappers.
Declaration
IMapperCollection? Mappers { get; }
Property Value
| Type | Description |
|---|---|
| IMapperCollection |
PocoDataFactory
Gets the Poco data factory.
Declaration
IPocoDataFactory PocoDataFactory { get; }
Property Value
| Type | Description |
|---|---|
| IPocoDataFactory |
SqlSyntax
Gets the Sql syntax provider.
Declaration
ISqlSyntaxProvider SqlSyntax { get; }
Property Value
| Type | Description |
|---|---|
| ISqlSyntaxProvider |
Templates
Gets the Sql templates.
Declaration
SqlTemplates Templates { get; }
Property Value
| Type | Description |
|---|---|
| SqlTemplates |
Methods
View SourceQuery<T>()
Creates a new query expression for the specified type T.
Declaration
IQuery<T> Query<T>()
Returns
| Type | Description |
|---|---|
| IQuery<T> | A new query expression of type IQuery<T>. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the entity to query. |
Sql()
Creates a new Sql expression.
Declaration
Sql<ISqlContext> Sql()
Returns
| Type | Description |
|---|---|
| Sql<ISqlContext> | A new Sql expression. |
Sql(string, params object[])
Creates a new NPoco.Sql<> expression from the specified SQL string and arguments.
Declaration
Sql<ISqlContext> Sql(string sql, params object[] args)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sql | The SQL query string to create the expression from. |
| object[] | args | The arguments to be used in the SQL query string. |
Returns
| Type | Description |
|---|---|
| Sql<ISqlContext> | A new NPoco.Sql<> expression representing the specified SQL query. |