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 Repository
Declaration
protected RepositoryBase(IScopeAccessor scopeAccessor, AppCaches appCaches)
Parameters
Type | Name | Description |
---|---|---|
IScope |
scopeAccessor | |
App |
appCaches |
Properties
View SourceAmbientScope
Gets the AmbientScope
Declaration
protected IScope AmbientScope { get; }
Property Value
Type | Description |
---|---|
IScope |
AppCaches
Gets the App
Declaration
protected AppCaches AppCaches { get; }
Property Value
Type | Description |
---|---|
App |
Database
Gets the repository's database.
Declaration
protected IUmbracoDatabase Database { get; }
Property Value
Type | Description |
---|---|
IUmbraco |
ScopeAccessor
Gets the IScope
Declaration
protected IScopeAccessor ScopeAccessor { get; }
Property Value
Type | Description |
---|---|
IScope |
SqlContext
Gets the Sql context.
Declaration
protected ISqlContext SqlContext { get; }
Property Value
Type | Description |
---|---|
ISql |
SqlSyntax
Gets the ISql
Declaration
protected ISqlSyntaxProvider SqlSyntax { get; }
Property Value
Type | Description |
---|---|
ISql |
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<ISql |
Sql(String, Object[])
Creates a
Declaration
protected Sql<ISqlContext> Sql(string sql, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
System. |
sql | |
System. |
args |
Returns
Type | Description |
---|---|
Sql<ISql |