예제 #1
0
        public bool Create(UserBO userBO)
        {
            using (var db = new dbGSCasinoContext())
            {
                using (var transaction = db.Database.BeginTransaction())
                {
                    UserInfoRepository userInfoRepository = new UserInfoRepository();
                    TblUserInfo        userInfo           = userInfoRepository.Create(userBO, db);

                    UserAuthRepository userAuthRepository = new UserAuthRepository();
                    TblUserAuth        userAuth           = userAuthRepository.Create(userBO, userInfo, db);

                    UserRoleRepository userRoleRepository = new UserRoleRepository();
                    userRoleRepository.Create(userAuth, db);

                    // CREATE USER WALLETS
                    UserWalletAppService userWallet = new UserWalletAppService();
                    userWallet.Create(userAuth, db);

                    transaction.Commit();

                    return(true);
                }
            }
        }