Class PetaPocoRepository<T>
Inheritance
System.Object
PetaPocoRepository<T>
Assembly: DotNetNuke.dll
Syntax
public class PetaPocoRepository<T> : RepositoryBase<T>, IRepository<T> where T : class
Type Parameters
Constructors
|
Improve this Doc
View Source
PetaPocoRepository(Database, IMapper)
Declaration
public PetaPocoRepository(Database database, IMapper mapper)
Parameters
Type |
Name |
Description |
Database |
database |
|
IMapper |
mapper |
|
Methods
|
Improve this Doc
View Source
Delete(String, Object[])
Delete items from the repository based on a sql Condition.
Declaration
public override void Delete(string sqlCondition, params object[] args)
Parameters
Type |
Name |
Description |
System.String |
sqlCondition |
The sql condition e.g. "WHERE ArticleId = {0}".
|
System.Object[] |
args |
A collection of arguments to be mapped to the tokens in the sqlCondition.
|
Overrides
DotNetNuke.Data.RepositoryBase<T>.Delete(System.String, System.Object[])
|
Improve this Doc
View Source
DeleteInternal(T)
Declaration
protected override void DeleteInternal(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
Overrides
DotNetNuke.Data.RepositoryBase<T>.DeleteInternal(T)
|
Improve this Doc
View Source
Find(Int32, Int32, String, Object[])
Find a GetPage of items from the repository based on a sql condition.
Declaration
public override IPagedList<T> Find(int pageIndex, int pageSize, string sqlCondition, params object[] args)
Parameters
Type |
Name |
Description |
System.Int32 |
pageIndex |
The page Index to fetch.
|
System.Int32 |
pageSize |
The size of the page to fetch.
|
System.String |
sqlCondition |
The sql condition e.g. "WHERE ArticleId = @0".
|
System.Object[] |
args |
A collection of arguments to be mapped to the tokens in the sqlCondition.
|
Returns
Overrides
DotNetNuke.Data.RepositoryBase<T>.Find(System.Int32, System.Int32, System.String, System.Object[])
|
Improve this Doc
View Source
Find(String, Object[])
Find items from the repository based on a sql condition.
Declaration
public override IEnumerable<T> Find(string sqlCondition, params object[] args)
Parameters
Type |
Name |
Description |
System.String |
sqlCondition |
The sql condition e.g. "WHERE ArticleId = @0".
|
System.Object[] |
args |
A collection of arguments to be mapped to the tokens in the sqlCondition.
|
Returns
Type |
Description |
IEnumerable<T> |
A list of items.
|
Overrides
DotNetNuke.Data.RepositoryBase<T>.Find(System.String, System.Object[])
|
Improve this Doc
View Source
GetByIdInternal(Object)
Declaration
protected override T GetByIdInternal(object id)
Parameters
Type |
Name |
Description |
System.Object |
id |
|
Returns
Overrides
DotNetNuke.Data.RepositoryBase<T>.GetByIdInternal(System.Object)
|
Improve this Doc
View Source
GetByScopeInternal(Object)
Declaration
protected override IEnumerable<T> GetByScopeInternal(object propertyValue)
Parameters
Type |
Name |
Description |
System.Object |
propertyValue |
|
Returns
Type |
Description |
IEnumerable<T> |
|
Overrides
DotNetNuke.Data.RepositoryBase<T>.GetByScopeInternal(System.Object)
|
Improve this Doc
View Source
GetInternal()
Declaration
protected override IEnumerable<T> GetInternal()
Returns
Type |
Description |
IEnumerable<T> |
|
Overrides
DotNetNuke.Data.RepositoryBase<T>.GetInternal()
|
Improve this Doc
View Source
GetPageByScopeInternal(Object, Int32, Int32)
Declaration
protected override IPagedList<T> GetPageByScopeInternal(object propertyValue, int pageIndex, int pageSize)
Parameters
Type |
Name |
Description |
System.Object |
propertyValue |
|
System.Int32 |
pageIndex |
|
System.Int32 |
pageSize |
|
Returns
Overrides
DotNetNuke.Data.RepositoryBase<T>.GetPageByScopeInternal(System.Object, System.Int32, System.Int32)
|
Improve this Doc
View Source
GetPageInternal(Int32, Int32)
Declaration
protected override IPagedList<T> GetPageInternal(int pageIndex, int pageSize)
Parameters
Type |
Name |
Description |
System.Int32 |
pageIndex |
|
System.Int32 |
pageSize |
|
Returns
Overrides
DotNetNuke.Data.RepositoryBase<T>.GetPageInternal(System.Int32, System.Int32)
|
Improve this Doc
View Source
InsertInternal(T)
Declaration
protected override void InsertInternal(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
Overrides
DotNetNuke.Data.RepositoryBase<T>.InsertInternal(T)
|
Improve this Doc
View Source
Update(String, Object[])
Update items in the repository based on a sql Condition.
Declaration
public override void Update(string sqlCondition, params object[] args)
Parameters
Type |
Name |
Description |
System.String |
sqlCondition |
The sql condition e.g. "SET ArticelName = @1 WHERE ArticleId = @0".
|
System.Object[] |
args |
A collection of arguments to be mapped to the tokens in the sqlCondition.
|
Overrides
DotNetNuke.Data.RepositoryBase<T>.Update(System.String, System.Object[])
|
Improve this Doc
View Source
UpdateInternal(T)
Declaration
protected override void UpdateInternal(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
Overrides
DotNetNuke.Data.RepositoryBase<T>.UpdateInternal(T)
Implements
Extension Methods