Abp: 请问在app层如何过滤数据?

Created on 20 Nov 2019  ·  2Comments  ·  Source: abpframework/abp

获取数据列表时需要进行一定的条件过滤。发现IRepository只提供了GetList()和GetListAsync()方法。请问如何实现条件过滤呢?

///


/// 获取全部可用的租户列表
///

///
public async Task> GetList()
{
//var data = await _tenantRepository.GetList().Where(o => o.IsActive == true).GetAll().Where(o => o.IsActive == true)
// .ToListAsync();
var data = await _tenantRepository.GetListAsync().Where(o => o.IsActive == true);
throw new NotImplementedException();
}

Most helpful comment

To customized methods for a repository, you can create your custom repository.
See https://docs.abp.io/en/abp/latest/Repositories#custom-repositories

By the way, please use English or most people can't understand it.

All 2 comments

whereif
linq

To customized methods for a repository, you can create your custom repository.
See https://docs.abp.io/en/abp/latest/Repositories#custom-repositories

By the way, please use English or most people can't understand it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leonkosak picture leonkosak  ·  3Comments

wocar picture wocar  ·  3Comments

hitaspdotnet picture hitaspdotnet  ·  3Comments

hikalkan picture hikalkan  ·  3Comments

zsanhong picture zsanhong  ·  3Comments