public bool AddPrisoner(PrisonerDto prisoner, out int newId)
        {
            int _newId = default(int);
            var result = new PrisonerServiceClient()
                         .Execute(client => client.AddPrisoner(prisoner, out _newId));

            newId = _newId;
            return(result);
        }
        public DetentionPagedListDto[] GetDetentionsByPrisonerIdForPagedList(int Id, int skip, int rowSize, out int totalCount)
        {
            int _totalCount = default(int);
            var detentions  = new PrisonerServiceClient()
                              .Execute(clinet => clinet.GetDetentionsByPrisonerIdForPagedList(Id, skip, rowSize, out _totalCount));

            totalCount = _totalCount;
            return(detentions);
        }
        public IReadOnlyList <PrisonerDto> GetPrisonersForPagedList(int skip, int rowSize, out int totalCount, DateTime?filterByDetainedDate, DateTime?filterByReleasedDate)
        {
            int totalCountPrisoners = default(int);

            var prisoners = new PrisonerServiceClient()
                            .Execute(client => client.GetPrisonersForPagedList(skip, rowSize, filterByDetainedDate, filterByReleasedDate, out totalCountPrisoners));

            totalCount = totalCountPrisoners;

            return(prisoners);
        }