Flexbase
Search…
Flexbase
Introduction
#JoyofCoding with Flexbase
Core Concepts
Thinking in Flexbase
Sample Application
Solution Structure
Introduction
Input Output Models
Messages
Domain
Pre Bus
Post Bus
Subscribers
Bus Gamma
Persistence
Hosting
Startup Code - WebAPI
Startup Code - Background Job
Endpoint - AppSettings
Bridge
Basic CRUD - Insert & Update
Introduction
View Generated API Definition in Swagger
Walkthrough Generated Code Insert
Walkthrough Generated Code Query GetById
Domain Model
Migration
AppSettings
Bus : How Basic Routing Config Works
INSERT : Input API Model
INSERT : Attribute Validation
INSERT : Plugin Validation
INSERT : Mapper
INSERT : Controller
INSERT : Services
INSERT : PostBus Handler
INSERT : PostBus Subscriber
INSERT : Demo In Action
QUERY : Output API Model
QUERY : Build and Fetch Pattern
QUERY : Demo In Action
Basic CRUD 2
Introduction
View Generated API Definition In Swagger
Walkthrough Generated Code Update
Walkthrough Generated Code Delete
Walkthrough Generated Code GetList
Walkthrough Generated Code Get Paged List
Update In Action
Delete In Action
GetList In Action
GetPagedList In Action
Konarch
Powered By
GitBook
Walkthrough Generated Code Get Paged List
BasicCRUD Part 2
Now let us walk through the generated code for the
GetPagedList
. Lets look at the output api model.
1
public class GetCustomersOutputAPIModel : IFlexOutputAPIModel
2
{
3
public string Id { get; set; }
4
public string Name { get; set; }
5
public DateTime DateOfBirth { get; set; }
6
}
Copied!
The GetPagedList is the same as the GetList. The only difference is it does the paging for you on the server-side.
1
public override FlexiPagedList<GetCustomersOutputAPIModel> Fetch()
2
{
3
..........
4
..........
5
6
var result = BuildPagedOutput(projection);
7
8
..........
9
​
10
return result;
11
}
Copied!
1
protected override IQueryable<T> Build<T>()
2
{
3
​
4
..............
5
..............
6
​
7
query = CreatePagedQuery<T>(query, _params.PageNumber, _params.PageSize);
8
​
9
return query;
10
}
Copied!
So this is the only difference the query executes and whatever the query result is there it appends the paging algorithm to the query so that you get the query from the server-side itself.
Previous
Walkthrough Generated Code GetList
Next
Update In Action
Last modified
1yr ago
Copy link