示例#1
0
 public static void Add(Message message)
 {
     var msg = HttpContext.Current.Session["messages"] as List<Message>;
     if (msg == null)
     {
         msg = new List<Message>();
     }
     msg.Add(message);
     HttpContext.Current.Session["messages"] = msg;
 }
示例#2
0
        public ActionResult Admin(Message message)
        {
            Session["Message"] = message.Text;

            var x =new DAL.PictureManager();
            x.PutMessage("Mikes Key", "1", message.Text);

            using (VPopContext db = new VPopContext())
            {
                db.Messages.Add(message);
                db.SaveChanges();
                return Content("Saved");
            }
        }