示例#1
0
        public async Task <CassetteList> GetAllAsync(int offset, int limit)
        {
            CassetteList response = new CassetteList()
            {
                Offset = offset, Limit = limit
            };
            var specification = _specificationCreator.CreateSpecification("All");

            response.Totalcount = await _realContainerRepo.GetCountAsync(specification);

            var res = await _realContainerRepo.GetListAsync(specification, "RealContainerId", string.Empty, offset, limit);

            response.Cassettes = _mapper.Map <List <RealContainer>, List <Cassette> >(res.ToList());
            return(response);
        }
        public async Task <int> GetCountRealContainersAsync(string qrCode, int creditOrgId, int?typeId, int?excludeTypeId, string method)
        {
            var specification = _specificationCreator.CreateSpecification(method, qrCode, creditOrgId, typeId, excludeTypeId);

            return(await _realcontainerRepository.GetCountAsync(specification));
        }