public ActionResult Tweet(string data) { var user = (Person)Session["User"]; var tweet = new Tweet { message = data, user_id = user.user_id, created = DateTime.Now }; var tweets = DataAccess.Tweet(tweet); return(View("_tweets", MapTweets(tweets))); }
public List <Tweet> Tweet(Tweet data) { DataObj.Tweets.AddOrUpdate(data); DataObj.SaveChanges(); return(GetTweets(data.user_id)); }