Class RepositoryBase
Base repository class for all IRepository instances
Inheritance
System.Object
Namespace: Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement
Assembly: Umbraco.Infrastructure.dll
Syntax
public abstract class RepositoryBase : IRepository
Constructors
View SourceRepositoryBase(IScopeAccessor, AppCaches)
Initializes a new instance of the RepositoryBase class.
Declaration
protected RepositoryBase(IScopeAccessor scopeAccessor, AppCaches appCaches)
Parameters
Type | Name | Description |
---|---|---|
IScopeAccessor | scopeAccessor | |
AppCaches | appCaches |
Properties
View SourceAmbientScope
Gets the AmbientScope
Declaration
protected IScope AmbientScope { get; }
Property Value
Type | Description |
---|---|
IScope |
AppCaches
Gets the AppCaches
Declaration
protected AppCaches AppCaches { get; }
Property Value
Type | Description |
---|---|
AppCaches |
Database
Gets the repository's database.
Declaration
protected IUmbracoDatabase Database { get; }
Property Value
Type | Description |
---|---|
IUmbracoDatabase |
ScopeAccessor
Gets the IScopeAccessor
Declaration
protected IScopeAccessor ScopeAccessor { get; }
Property Value
Type | Description |
---|---|
IScopeAccessor |
SqlContext
Gets the Sql context.
Declaration
protected ISqlContext SqlContext { get; }
Property Value
Type | Description |
---|---|
ISqlContext |
SqlSyntax
Gets the ISqlSyntaxProvider
Declaration
protected ISqlSyntaxProvider SqlSyntax { get; }
Property Value
Type | Description |
---|---|
ISqlSyntaxProvider |
Methods
View SourceQuery<T>()
Creates a new query expression
Declaration
protected IQuery<T> Query<T>()
Returns
Type | Description |
---|---|
IQuery<T> |
Type Parameters
Name | Description |
---|---|
T |
Sql()
Creates an
Declaration
protected Sql<ISqlContext> Sql()
Returns
Type | Description |
---|---|
Sql<ISqlContext> |
Sql(String, Object[])
Creates a
Declaration
protected Sql<ISqlContext> Sql(string sql, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System.String | sql | |
System.Object[] | args |
Returns
Type | Description |
---|---|
Sql<ISqlContext> |