示例#1
0
        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)));
        }
示例#2
0
 public List <Tweet> Tweet(Tweet data)
 {
     DataObj.Tweets.AddOrUpdate(data);
     DataObj.SaveChanges();
     return(GetTweets(data.user_id));
 }