示例#1
0
 public bool Delete(string SessionId, int tid)
 {
     if (Session.Session.Validate(SessionId))
     {
         TweetBll tweetBll = new TweetBll();
         return(tweetBll.DeleteTweet(Session.Session.Guid[SessionId], tid));
     }
     return(false);
 }
示例#2
0
 // PUT: api/Tweet/5
 public bool Put(TweetDto updatedTweet)
 {
     if (Session.Session.Validate(updatedTweet.SessionId))
     {
         TweetBll tweetBll = new TweetBll();
         return(tweetBll.UpdateTweet(updatedTweet));
     }
     return(false);
 }
示例#3
0
 public IList <GetTweetDto> Get(string sessionId)
 {
     if (Session.Session.Validate(sessionId))
     {
         TweetBll tweetBll = new TweetBll();
         return(tweetBll.GetAllTweet(Session.Session.Guid[sessionId]));
     }
     return(null);
 }
示例#4
0
 // POST: api/Tweet
 public bool Post(TweetDto tweetDtoObject)
 {
     if (ModelState.IsValid)
     {
         if (Session.Session.Validate(tweetDtoObject.SessionId))
         {
             TweetBll tweetBll = new TweetBll();
             return(tweetBll.AddTweet(tweetDtoObject));
         }
     }
     return(false);
 }