public void CreateArticle(Article article)
 {
     using (var pooledRedisClient = new PooledRedisClientManager())
     using (var redis = pooledRedisClient.GetClient())
     {
         var redisArticles = redis.As<Article>();
         if (article.Id == 0)
         {
             article.Id = (int)redisArticles.GetNextSequence();
         }
         redisArticles.Store(article);
         var set = redis.Sets["Articles"];
         set.Add(article.Id.ToString());
     }
 }
        public ActionResult EditArticle(Article article)
        {
            List<string> validation = new List<string>();
            if (Context.Session.GetString("user") == null || (JsonConvert.DeserializeObject<User>(Context.Session.GetString("user"))).IsAdmin != true)
            {
                return RedirectToAction("Index", "Home");
            }
            if (article.Body == null)
            {
                validation.Add("Please enter a post body");
            }
            if (article.Name == null)
            {
                validation.Add("Please enter a post name");
            }
            ViewData["validationSummary"] = validation;

            if(!validation.Any())
            {
                redisNews.CreateArticle(article);
                return RedirectToAction("Index");
            }
            else
            {
                return View();
            }
        }