Example #1
0
        private static void CreateInitialValuesInDatabase(Account account, TimeWarpUserState state1, TimeWarpUserState state2)
        {
            var accountRepository = new AccountRepository();

            accountRepository.Add(account);

            var repository = new TimeWarpUserStateRepository();

            repository.Add(state1);
            repository.Add(state2);
        }
 public void SaveState(TimeWarpUserState newState)
 {
     //this should probably be on a new thread...and exception handling. logging ..etc
     using (var session = new NHibernateSessionPerRequest <TimeWarpUserStateClassMap>())
     {
         var repository = new TimeWarpUserStateRepository(session.GetCurrentSession());
         repository.Add(newState);
     }
 }