Ejemplo n.º 1
0
        public async Task <IEnumerable <Diver> > GetAsync(IFilterOptions options)
        {
            IEnumerable <DiverPoco> pocos;

            if (options == null)
            {
                pocos = await _diverRepository.GetListAsync();
            }
            else
            {
                pocos = await _diverRepository.GetListAsync(options);
            }

            var divers = pocos.Select(p => _mapper.Map <Diver>(p));

            return(divers);
        }