예제 #1
0
        //LongPolling Action 2 - 异步处理完成,向客户端发送响应
        public ActionResult LongPollingCompleted(LoginLogModel model)
        {
            var log = _loginLogService.GetLoginLog(model.Id);

            if (log != null)
            {
                log.IsDeleted = true;
                _loginLogService.Update();
                var authenticationManager = HttpContext.GetOwinContext().Authentication;
                var identity = UserService.CreateIdentity(log.WeChatUser, DefaultAuthenticationTypes.ApplicationCookie);
                authenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie);
                authenticationManager.SignIn(new AuthenticationProperties(), identity);
            }
            return(Json(model, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
 public Task <IResultModel> Update(LoginLogUpdateModel model)
 {
     return(_service.Update(model));
 }