0
bilalhaidar created
Hi,
In an AppService, I have this code:
var query = _manager.Shelters
.WhereIf(
!input.Filter.IsNullOrWhiteSpace(),
t =>
t.ShelterCode.ToLower().Contains(input.Filter.Trim().ToLower()) ||
t.ShelterSubCode.ToLower().Contains(input.Filter.Trim().ToLower())
);
The _manager.Shelters is defined in the manager as:
public virtual IQueryable<Shelter> Shelters { get { return _repository.GetAll(); } }
Now, if I hover over query above, it says it is of type IEnumerable<Shelter>. I want it to stay IQueryable<Shelter> so that I can do additional filtering, sorting, etc.
I tried to remove (WhereIf), then if I hover over query it displays IQueryable<Shelter>
The same code used in TenantAppService, works fine there. Am I missing any namespace reference?
Thanks
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
3 Answer(s)
-
0
I was missing this reference:
using Abp.Linq.Extensions;
Regards Bilal
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
You started to answer your own questions :)
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Yes :)
I thought of not deleting the post in case someone else faced the issue.
Regards Bilal
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)