Esempio n. 1
0
        public ActionResult AddTopic()
        {
            Topic t = new Topic();

            t.Description = "alsdjflasdjf";
            t.CreateTime = DateTime.Now;
            t.Author = "jjjj";

            //return Json(t, JsonRequestBehavior.AllowGet);
            return View(t);
        }
Esempio n. 2
0
        public ActionResult AddTopic(string title, string desc)
        {
            using (blogEntities en = new blogEntities()) {
                Topic t = new Topic();

                t.Title = title;
                t.Description = desc;
                t.CreateTime = t.UpdateTime = DateTime.Now;
                t.Author = base.Passport.AccountID;
                t.ID = Guid.NewGuid();

                en.Topics.Add(t);

                en.SaveChanges();

                return View(t);
            }
        }
Esempio n. 3
0
 public ActionResult TopicDetailsPartial(Topic model)
 {
     return View(model);
 }