Beispiel #1
0
        public IEnumerable <ViewModelNewsItem> GetAvailableNewsItems(int clientId)
        {
            var raw = _newsRepository.FilterBy(o => !o.IsDeleted && o.ClientId == clientId).ToList();

            var converted = raw.Select(item =>
            {
                var viewModelNewsItem = new ViewModelNewsItem();
                viewModelNewsItem.InjectFrom <CloneInjection>(item);
                return(viewModelNewsItem);
            }).ToList();

            return(converted);
        }