Example #1
0
        public async Task <int> GetInmatesCount(InmateFilter filter)
        {
            var spec = new InmateSpecification(filter, true);

            return(await _unitOfWork.Repository <Inmate>().GetCountForSpecAsync(spec));
        }
Example #2
0
        public async Task <IReadOnlyList <InmateToReturnDto> > GetInmates(InmateFilter filter)
        {
            var spec = new InmateSpecification(filter);

            return(await _unitOfWork.Repository <Inmate>().FindAllBySpecAsync <InmateToReturnDto>(spec));
        }