public PartialViewResult Tweet(HomeViewModel model) { Tweet tweet = new Tweet() { BelongsTo = _twitterService.GetFeed(Convert.ToInt64(model.SelectedFeed)), Content = model.Tweet, PostDate = DateTime.Now }; _twitterService.AddTweet(tweet); _unit.Commit(); HomeViewModel updatedMode = GenerateIndexModel(model.DisplayFeed); updatedMode.Tweet = ""; updatedMode.SelectedFeed = model.SelectedFeed; ModelState.Clear(); return PartialView("_TweetView", updatedMode); }
public void AddTweet(Twitter_Shared.Data.Model.Tweet tweet) { _tweetRepository.Insert(tweet); }