Show / Hide Table of Contents

Class RepositoryBase<T>

Inheritance
object
RepositoryBase<T>
PetaPocoRepository<T>
Implements
IRepository<T>
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DotNetNuke.Data
Assembly: DotNetNuke.dll
Syntax
public abstract class RepositoryBase<T> : IRepository<T> where T : class
Type Parameters
Name Description
T

Constructors

RepositoryBase()

Declaration
protected RepositoryBase()

Properties

CacheArgs

Declaration
protected CacheItemArgs CacheArgs { get; }
Property Value
Type Description
CacheItemArgs

IsCacheable

Declaration
protected bool IsCacheable { get; }
Property Value
Type Description
bool

IsScoped

Declaration
protected bool IsScoped { get; }
Property Value
Type Description
bool

Scope

Declaration
protected string Scope { get; }
Property Value
Type Description
string

Methods

CompareTo<TProperty>(TProperty, TProperty)

Declaration
protected int CompareTo<TProperty>(TProperty first, TProperty second)
Parameters
Type Name Description
TProperty first
TProperty second
Returns
Type Description
int
Type Parameters
Name Description
TProperty

Delete(string, params object[])

Declaration
public abstract void Delete(string sqlCondition, params object[] args)
Parameters
Type Name Description
string sqlCondition
object[] args

Delete(T)

Declaration
public void Delete(T item)
Parameters
Type Name Description
T item

DeleteInternal(T)

Declaration
protected abstract void DeleteInternal(T item)
Parameters
Type Name Description
T item

Find(int, int, string, params object[])

Declaration
public abstract IPagedList<T> Find(int pageIndex, int pageSize, string sqlCondition, params object[] args)
Parameters
Type Name Description
int pageIndex
int pageSize
string sqlCondition
object[] args
Returns
Type Description
IPagedList<T>

Find(string, params object[])

Declaration
public abstract IEnumerable<T> Find(string sqlCondition, params object[] args)
Parameters
Type Name Description
string sqlCondition
object[] args
Returns
Type Description
IEnumerable<T>

Get()

Declaration
public IEnumerable<T> Get()
Returns
Type Description
IEnumerable<T>

GetByIdInternal(object)

Declaration
protected abstract T GetByIdInternal(object id)
Parameters
Type Name Description
object id
Returns
Type Description
T

GetById<TProperty>(TProperty)

Declaration
public T GetById<TProperty>(TProperty id)
Parameters
Type Name Description
TProperty id
Returns
Type Description
T
Type Parameters
Name Description
TProperty

GetById<TProperty, TScopeType>(TProperty, TScopeType)

Declaration
public T GetById<TProperty, TScopeType>(TProperty id, TScopeType scopeValue)
Parameters
Type Name Description
TProperty id
TScopeType scopeValue
Returns
Type Description
T
Type Parameters
Name Description
TProperty
TScopeType

GetByScopeInternal(object)

Declaration
protected abstract IEnumerable<T> GetByScopeInternal(object propertyValue)
Parameters
Type Name Description
object propertyValue
Returns
Type Description
IEnumerable<T>

GetInternal()

Declaration
protected abstract IEnumerable<T> GetInternal()
Returns
Type Description
IEnumerable<T>

GetPage(int, int)

Declaration
public IPagedList<T> GetPage(int pageIndex, int pageSize)
Parameters
Type Name Description
int pageIndex
int pageSize
Returns
Type Description
IPagedList<T>

GetPageByScopeInternal(object, int, int)

Declaration
protected abstract IPagedList<T> GetPageByScopeInternal(object propertyValue, int pageIndex, int pageSize)
Parameters
Type Name Description
object propertyValue
int pageIndex
int pageSize
Returns
Type Description
IPagedList<T>

GetPageInternal(int, int)

Declaration
protected abstract IPagedList<T> GetPageInternal(int pageIndex, int pageSize)
Parameters
Type Name Description
int pageIndex
int pageSize
Returns
Type Description
IPagedList<T>

GetPage<TScopeType>(TScopeType, int, int)

Declaration
public IPagedList<T> GetPage<TScopeType>(TScopeType scopeValue, int pageIndex, int pageSize)
Parameters
Type Name Description
TScopeType scopeValue
int pageIndex
int pageSize
Returns
Type Description
IPagedList<T>
Type Parameters
Name Description
TScopeType

GetPrimaryKey<TProperty>(T)

Declaration
protected TProperty GetPrimaryKey<TProperty>(T item)
Parameters
Type Name Description
T item
Returns
Type Description
TProperty
Type Parameters
Name Description
TProperty

GetPropertyValue<TProperty>(T, string)

Declaration
protected TProperty GetPropertyValue<TProperty>(T item, string propertyName)
Parameters
Type Name Description
T item
string propertyName
Returns
Type Description
TProperty
Type Parameters
Name Description
TProperty

GetScopeValue<TProperty>(T)

Declaration
protected TProperty GetScopeValue<TProperty>(T item)
Parameters
Type Name Description
T item
Returns
Type Description
TProperty
Type Parameters
Name Description
TProperty

Get<TScopeType>(TScopeType)

Declaration
public IEnumerable<T> Get<TScopeType>(TScopeType scopeValue)
Parameters
Type Name Description
TScopeType scopeValue
Returns
Type Description
IEnumerable<T>
Type Parameters
Name Description
TScopeType

Initialize(string, int, CacheItemPriority, string)

Declaration
public void Initialize(string cacheKey, int cacheTimeOut = 20, CacheItemPriority cachePriority = CacheItemPriority.Default, string scope = "")
Parameters
Type Name Description
string cacheKey
int cacheTimeOut
CacheItemPriority cachePriority
string scope

Insert(T)

Declaration
public void Insert(T item)
Parameters
Type Name Description
T item

InsertInternal(T)

Declaration
protected abstract void InsertInternal(T item)
Parameters
Type Name Description
T item

Update(string, params object[])

Declaration
public abstract void Update(string sqlCondition, params object[] args)
Parameters
Type Name Description
string sqlCondition
object[] args

Update(T)

Declaration
public void Update(T item)
Parameters
Type Name Description
T item

UpdateInternal(T)

Declaration
protected abstract void UpdateInternal(T item)
Parameters
Type Name Description
T item

Implements

IRepository<T>

Extension Methods

JsonExtensionsWeb.ToJson(object)
Back to top by the community, for the community... #DNNCMS