Class SqlContext
Implements ISql
Inheritance
System.Object
Namespace: Umbraco.Cms.Infrastructure.Persistence
Assembly: Umbraco.Infrastructure.dll
Syntax
public class SqlContext : ISqlContext
Constructors
View SourceSqlContext(ISqlSyntaxProvider, DatabaseType, IPocoDataFactory, IMapperCollection)
Initializes a new instance of the Sql
Declaration
public SqlContext(ISqlSyntaxProvider sqlSyntax, DatabaseType databaseType, IPocoDataFactory pocoDataFactory, IMapperCollection mappers = null)
Parameters
Type | Name | Description |
---|---|---|
ISql |
sqlSyntax | The sql syntax provider. |
Database |
databaseType | The database type. |
IPoco |
pocoDataFactory | The Poco data factory. |
IMapper |
mappers | The mappers. |
Properties
View SourceDatabaseType
Gets the database type.
Declaration
public DatabaseType DatabaseType { get; }
Property Value
Type | Description |
---|---|
Database |
Mappers
Gets the mappers.
Declaration
public IMapperCollection Mappers { get; }
Property Value
Type | Description |
---|---|
IMapper |
PocoDataFactory
Gets the Poco data factory.
Declaration
public IPocoDataFactory PocoDataFactory { get; }
Property Value
Type | Description |
---|---|
IPoco |
SqlSyntax
Gets the Sql syntax provider.
Declaration
public ISqlSyntaxProvider SqlSyntax { get; }
Property Value
Type | Description |
---|---|
ISql |
Templates
Gets the Sql templates.
Declaration
public SqlTemplates Templates { get; }
Property Value
Type | Description |
---|---|
Sql |
Methods
View SourceQuery<T>()
Creates a new query expression.
Declaration
public IQuery<T> Query<T>()
Returns
Type | Description |
---|---|
IQuery<T> |
Type Parameters
Name | Description |
---|---|
T |
Sql()
Creates a new Sql expression.
Declaration
public Sql<ISqlContext> Sql()
Returns
Type | Description |
---|---|
Sql<ISql |
Sql(String, Object[])
Creates a new Sql expression.
Declaration
public Sql<ISqlContext> Sql(string sql, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System. |
sql | |
System. |
args |
Returns
Type | Description |
---|---|
Sql<ISql |