Example #1
0
        public ActionResult Create()
        {
            var model = new PostModel();

            model.CreateDate         = DateTime.UtcNow;
            model.IsActive           = true;
            model.ApproveComment     = true;
            model.AllowComment       = true;
            model.ViewName           = "View.Default";
            model.Categories         = categoryService.GetActives();
            model.AvailableViewNames = this.GetViewNames();
            model.AvailableTags      = new MultiSelectList(postTagService.GetAllTags().Select(s => s.Name), model.Tags);
            return(View(model));
        }