Exemple #1
0
        public AuthenticatedLoginControlViewModel Authenticated(AccountManagement.Account account)
        {
            User user      = _userRepository.GetUser(account.AccountId);
            var  viewModel = new AuthenticatedLoginControlViewModel(user.FullName, _siteMap.GetLandingPage(account));

            return(viewModel);
        }
Exemple #2
0
 public void CreateAccount(AccountManagement.Account account, SaltedHash passwordHash, UserId userId)
 {
     Contract.Assert(account.AccountId.IsNew);
     using (var db = new THCard()) {
         using (var transaction = new TransactionScope()) {
             var dbAccount = new Account {
                 Username        = account.Username.ToString(),
                 UserId          = userId.ToGuid(),
                 AccountPassword = new AccountPassword {
                     PasswordHash = passwordHash.Hash,
                     Salt         = passwordHash.Salt
                 }
             };
             db.Accounts.Add(dbAccount);
             db.SaveChanges();
             transaction.Complete();
             account.AccountId = new AccountId(dbAccount.AccountId);
         }
     }
 }
Exemple #3
0
 public void SaveAccount(AccountManagement.Account account)
 {
     throw new NotImplementedException();
 }