示例#1
0
        public ICollection <ShareDTO> GetAllShares(StatisticsDTO statistics)
        {
            var shares = repo.GetAll().Select(p => Mapper.Map <ShareDTO>(p)).ToList();

            statistics.SelectsTime += repo.LastOperationTime;
            statistics.SelectsCount++;

            return(shares);
        }
        public IEnumerable <ShareDto> GetAllShares()
        {
            var shares = _shareRepository.GetAll();

            var shareDtoList = new List <ShareDto>();

            shares.ToList().ForEach(t =>
                                    shareDtoList.Add(Mapper.Map <Share, ShareDto>(t)));

            return(shareDtoList.OrderBy(t => t.Id));
        }