예제 #1
0
        public PaginatedDto<UserDto> GetUsers(PaginatedRequestCommand cmd) {

            var users = _membershipService.GetUsers(cmd.Page, cmd.Take);

            return users.ToPaginatedDto(
                users.Select(user => user.ToUserDto()));
        }
        public PaginatedDto<AffiliateDto> GetAffiliates(PaginatedRequestCommand cmd) {

            var affiliates = _shipmentService.GetAffiliates(
                cmd.Page, cmd.Take);

            return affiliates.ToPaginatedDto(
                affiliates.Select(af => af.ToAffiliateDto()));
        }
        public PaginatedDto<ShipmentDto> GetShipments(Guid key, PaginatedRequestCommand cmd) {

            var shipments = _shipmentService
                .GetShipments(cmd.Page, cmd.Take, affiliateKey: key);

            return shipments.ToPaginatedDto(
                shipments.Select(sh => sh.ToShipmentDto()));
        }
        public PaginatedDto<ShipmentTypeDto> GetShipmentTypes(
            PaginatedRequestCommand cmd) {

            var shipmentTypes = _shipmentService.GetShipmentTypes(
                cmd.Page, cmd.Take);

            return shipmentTypes.ToPaginatedDto(
                shipmentTypes.Select(st => st.ToShipmentTypeDto()));
        }