예제 #1
0
        public static IEnumerable <D> GetAll(ReadOnlyRepository <S> repo)
        {
            var items = repo.GetAll().ToList();

            if (items.Any())
            {
                var model = Mapper.Map <List <S>, List <D> >(items);
                return(model);
            }
            return(null);
        }