Massive.DynamicModel.Paged C# (CSharp) Method

Paged() public method

Returns a dynamic PagedResult. Result properties are Items, TotalPages, and TotalRecords.
public Paged ( string where = "", string orderBy = "", string columns = "*", int pageSize = 20, int currentPage = 1 ) : dynamic
where string
orderBy string
columns string
pageSize int
currentPage int
return dynamic
        public virtual dynamic Paged(string where = "", string orderBy = "", string columns = "*", int pageSize = 20, int currentPage = 1, params object[] args)
        {
            return BuildPagedResult(where: where, orderBy: orderBy, columns: columns, pageSize: pageSize, currentPage: currentPage, args: args);
        }

Same methods

DynamicModel::Paged ( string sql, string primaryKey, string where = "", string orderBy = "", string columns = "*", int pageSize = 20, int currentPage = 1 ) : dynamic

Usage Example

 public void BasicPaging()
 {
     dynamic artists = new DynamicModel("Chinook", "Artist", "ArtistId");
     dynamic artistsPage2 = artists.Paged(currentPage: 2, pageSize: 5);
     foreach( dynamic item in artistsPage2.Items) {};
 }
All Usage Examples Of Massive.DynamicModel::Paged