Esempio n. 1
0
        public List <Speaker> ReadAllSpeakers(Filter filter)
        {
            if (filter.CurrentPage < 0 || filter.ItemsPrPage < 0)
            {
                throw new InvalidDataException("The entered paging is invalid");
            }

            if (((filter.CurrentPage - 1) * filter.ItemsPrPage) > _speakerRepository.Count())
            {
                throw new Exception("The current page you have selected is to high.");
            }

            return(_speakerRepository.ReadAllSpeakers(filter).ToList());
        }