예제 #1
0
        public bool UpdateAccountUser(AccountUser accountUser)
        {
            if (accountUser.AddressId== 0)
               {
               //save the address and get the addressId
               var dataAddress = Mapper.Map<DataAddress>(accountUser.Address);
               accountUser.AddressId = _addressRepository.SaveAddress(dataAddress);
               }

               var dataAccountUser = Mapper.Map<DataAccountUser>(accountUser);

               return _accountUserRepository.UpdateAccountUser(dataAccountUser);
        }
예제 #2
0
 public AccountUser RegisterAccountUser(AccountUser accountUser)
 {
     var dataAccountUser = Mapper.Map<DataAccountUser>(accountUser);
     dataAccountUser = _accountUserRepository.RegisterAccountUser(dataAccountUser);
     return Mapper.Map<AccountUser>(dataAccountUser);
 }