贵有恒,何必三更起、五更眠、最无益,只怕一日曝、十日寒。这篇文章主要讲述abpCrudAppService自定义分页排序相关的知识,希望能为你提供帮助。
public class GetAllTasksInput : PagedAndSortedResultRequestDto
{
public TaskState? State { get;
set;
}
}
public class TaskAppService : AsyncCrudAppService<
Task, TaskDto, int, GetAllTasksInput>
{
public TaskAppService(IRepository<
Task>
repository)
: base(repository)
{}protected override IQueryable<
Task>
CreateFilteredQuery(GetAllTasksInput input)
{
return base.CreateFilteredQuery(input)
.WhereIf(input.State.HasValue, t =>
t.State == input.State.Value);
}
}
【abpCrudAppService自定义分页排序】参考:
https://aspnetboilerplate.com/Pages/Documents/Application-Services
https://docs.microsoft.com/en-us/aspnet/core/data/ef-rp/sort-filter-page?view=aspnetcore-2.2
推荐阅读
- Eclipse中通过Android模拟器调用OpenGL ES2 0函数操作步骤
- 4.Appium 安卓自动化(Andriod SDK)
- 区块链会员系统开发,制度钱包app开发
- Cause: java. lang.InstantiationException: tk.mybatis.mapper.provider.base.BaseInsertProvider
- 5.Appium 安卓自动化(UIAutomator)
- Android mk和Application mk文件语法规范说明及举例
- 趣享付APP再升级,剑指精准营销
- selector的使用,android:clickable="true"
- Task 'assembleXXXDebug' not found in project ':app'.的解决方法