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); }
// 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); }
public IList <GetTweetDto> Get(string sessionId) { if (Session.Session.Validate(sessionId)) { TweetBll tweetBll = new TweetBll(); return(tweetBll.GetAllTweet(Session.Session.Guid[sessionId])); } return(null); }
// 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); }