public HttpResponseMessage GetTweetsSearched(string key) { var tweets = _tweetManager.SearchTweets(key).OrderByDescending(t => t.CreatedOn).Select(sp => sp.ToTweetDto()); TweetResponseDto tweetsResponseDto = new TweetResponseDto { Tweets = tweets, TweetsCount = tweets.Count() }; return(Request.CreateResponse(HttpStatusCode.OK, tweetsResponseDto)); }
public HttpResponseMessage GetTweetsSearched(string key) { return(Request.CreateResponse(HttpStatusCode.OK, _tweetManager.SearchTweets(key).Select(sp => sp.ToTweetDto()))); }