S
shapper
Hello,
On my repositories I always return a IQueryable when getting multiple
records, for example in:
productRepository.GetMoreExpensive();
However, most the code I see use IEnumerable. For example:
1. ToPagedList extension ...
2. AutoMapper to mape between a source collection and a destination
collection ...
So I always need to change my IQueryable obtained through the
repository and convert it to IEnumerable to be able to use the
ToPagedList extension and the AutoMapper.
Should I use IEnumerable on my repositories?
I am afraid I am doing something wrong.
Thanks,
Miguel
On my repositories I always return a IQueryable when getting multiple
records, for example in:
productRepository.GetMoreExpensive();
However, most the code I see use IEnumerable. For example:
1. ToPagedList extension ...
2. AutoMapper to mape between a source collection and a destination
collection ...
So I always need to change my IQueryable obtained through the
repository and convert it to IEnumerable to be able to use the
ToPagedList extension and the AutoMapper.
Should I use IEnumerable on my repositories?
I am afraid I am doing something wrong.
Thanks,
Miguel