public IList <NewsArticle> GetNewsArticlePreviews(int page, int pageSize) { var articles = _newsArticleRepository.GetNewsArticlePreviews(page, pageSize); foreach (var article in articles) { // truncate the body to 200 chars and last space if (article.Body.Length <= 200) { continue; } article.Body = article.Body.Substring(0, 200); article.Body = article.Body.Substring(0, article.Body.LastIndexOf(' ')) + "..."; } return(articles); }