예제 #1
0
        public ActionResult Create(string txt)
        {
            var Model = new ChatViewModel();

            Model.Text         = txt;
            Model.PostTime     = DateTime.UtcNow;
            Model.AccountRefID = new Guid();
            if (User.Identity.IsAuthenticated)
            {
                var acc = Crud.GetAccount(User.Identity.Name);
                Model.AccountRefID = acc.Id;
            }
            Crud.CreateChatPost(Model.ToEntity());
            return(View());
        }