public async Task <int> GetInmatesCount(InmateFilter filter) { var spec = new InmateSpecification(filter, true); return(await _unitOfWork.Repository <Inmate>().GetCountForSpecAsync(spec)); }
public async Task <IReadOnlyList <InmateToReturnDto> > GetInmates(InmateFilter filter) { var spec = new InmateSpecification(filter); return(await _unitOfWork.Repository <Inmate>().FindAllBySpecAsync <InmateToReturnDto>(spec)); }