public ActionResult Update([DataSourceRequest] DataSourceRequest request, TweetAdministrationViewModel tweet)
        {
            if (tweet != null && ModelState.IsValid)
            {
                var existingTweet = this.Data.Tweets.GetById(tweet.Id);

                existingTweet.Content = tweet.Content;

                this.Data.SaveChanges();

                var hashTags = GetHashTags(tweet.Content);
                existingTweet.HashTags.Clear();

                foreach (var hashTag in hashTags)
                {
                    var resultHashTag = this.CreateOrUpdateHashTag(hashTag);
                    existingTweet.HashTags.Add(resultHashTag);
                    this.Data.HashTags.Update(resultHashTag);
                }

                this.Data.Tweets.Update(existingTweet);
                this.Data.SaveChanges();
            }

            return Json(new[] { tweet }.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
        }
        public ActionResult Delete([DataSourceRequest] DataSourceRequest request, TweetAdministrationViewModel tweet)
        {
            if (tweet != null && ModelState.IsValid)
            {
                try
                {
                    this.Data.Tweets.Delete(tweet.Id);
                    this.Data.SaveChanges();
                }
                catch (Exception ex)
                {
                    ModelState.AddModelError(string.Empty, ex.Message);
                }
            }

            return Json(new[] { tweet }.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
        }