query = from pc in _paidClaimsRepository.GetAll()
join pcl in _paidClaimLinesRepository.GetAll() on pc.Id equals pcl.ClaimId
join cp in _claimpaymentRepository.GetAll() on pc.PaymentId equals cp.Id
where cp.Id == input.Id
select new BillingClaimListReportDto
Id = cp.Id,
PayeeId = cp.PayeeId,
InvoiceNum = pc.ClaimId,
PersonId = pc.PersontId,
Last = pc.PersonLast,
First = pc.PersonFirst,
Hcpc = pcl.ProcedureCode,
ChargedAmount = pcl.ChargedAmount,
PaidAmount = pcl.PaidAmount,
UnitsPaid = pcl.UnitsPaid,
ServiceDate = pcl.ServiceDate,
PayersClaimId = pc.PayersClaimId
var remitsCount = await query.CountAsync();
var billingRemitsList = await query
Actually, this question is not related with the aspnet-zero. In this question, there are many arguments to know to improve your query performance.
May be you should ask this question in a common software QA site like http://stackoverflow.com/
I disagree with you because I am using the ASP.NET Zero repository to query and the PagedResultDto which is also a class built into ABP. I believe this is a relevant question.
Can you check executing SQL query using SQL profiler ?
If your entity is a soft delete entity, ABP adds IsDeleted = 0 to your query as you know.
Also If your entity is a MayHaveTenant or MustHaveTenant entity, TenantId filter is added as well.
Probably you need to add an index to your table.
You can decide the index columns according to executed SQL query.