protected override void OnActionExecuting(ActionExecutingContext filterContext) { var cookie = Request.Cookies[Constants.CookieSessionName]; Profile = userProfileService.UpdateVisitorProfile( cookieService.DecryptCookie(cookie != null ? cookie.Value : null), Request.UserHostAddress, Request.Url.PathAndQuery, Request.QueryString["lang"]); if(cookie == null) Response.SetCookie(new HttpCookie(Constants.CookieSessionName, cookieService.EncryptCookie(Profile.ID)) { Expires = DateTime.Now.AddYears(100) }); base.OnActionExecuting(filterContext); }
public void UpdateVisitor(VisitorProfile model) { using (var db = new MovieFinderEntities()) { } }