Beispiel #1
0
        public IEnumerable <PublicationDto> GetAllPublications(DateTime?loanDate)
        {
            IEnumerable <Publication> pubs;

            if (loanDate.HasValue)
            {
                pubs = _borrowRepo.GetAllPublicationsThatAreOnLoanByParticularDate((DateTime)loanDate);
            }
            else
            {
                pubs = _publicationRepo.GetAllPublications();
            }
            return(pubs.Select(p => new PublicationDto(p)));
        }