Exemple #1
0
 public static CurrentUser GetCurrentUser()
 {
     var mySession = Bootstrapper.Instance.UnityContainer.Resolve<ISession>();
     var user = mySession["Current_User"] as CurrentUser;
     if (user == null)
     {
         user = new CurrentUser();
         mySession.Set("Current_User", user);
     }
     return user;
 }
Exemple #2
0
 public static void SetUser(CurrentUser user)
 {
     var mySession = Bootstrapper.Instance.UnityContainer.Resolve<ISession>();
     mySession.Set("Current_User", user);
 }