Пример #1
0
            /// <summary>
            /// Stories the view.
            /// </summary>
            /// <param name="publications">The publications.</param>
            /// <returns>StoryViewModels.</returns>
            public static StoryViewModels StoryView(List <ItemContent> publications)
            {
                var stories = mapper.Map <List <StoryViewModel> >(publications);

                StoryViewModels model = new StoryViewModels(stories);

                return(model);
            }
Пример #2
0
        /// <summary>
        /// Maps the story view.
        /// </summary>
        /// <param name="publications">The publications.</param>
        /// <returns>List&lt;StoryViewModel&gt;.</returns>
        public static StoryViewModels StoryView(List <Publication> publications)
        {
            var stories = AppService.Mapper.Map <List <StoryViewModel> >(publications);

            StoryViewModels model = new StoryViewModels(stories);

            return(model);
        }
Пример #3
0
        /// <summary>
        /// Maps the story view.
        /// </summary>
        /// <param name="publications">The publications.</param>
        /// <returns>List&lt;StoryViewModel&gt;.</returns>
        public static StoryViewModels MapStoryView(List <Models.Publication> publications)
        {
            IMapper mapper  = AutoMapper.Mapper.Instance;
            var     stories = mapper.Map <List <ViewModels.StoryViewModel> >(publications);

            StoryViewModels model = new StoryViewModels(stories);

            return(model);
        }