Ejemplo n.º 1
0
        ///<Summary>
        ///AddIdentityuserrole
        ///This method persists a BOIdentityuserrole object to the database collection
        ///</Summary>
        ///<returns>
        ///void
        ///</returns>
        ///<parameters>
        ///BOIdentityuserrole
        ///</parameters>
        public virtual void AddIdentityuserrole(IBOIdentityuserrole boIdentityuserrole)
        {
            Doing(this);
            IDAOIdentityuserrole daoIdentityuserrole = _iIdentityuserroleRepository.New();

            RegisterDataObject(_iIdentityuserroleRepository, _iIdentityuserroleRepository.BaseData(daoIdentityuserrole));
            BeginTransaction(_iIdentityuserroleRepository, "addIdentityuserrole");
            try
            {
                daoIdentityuserrole.UserId = boIdentityuserrole.UserId;
                daoIdentityuserrole.RoleId = _ıd;
                _iIdentityuserroleRepository.Insert(daoIdentityuserrole);
                CommitTransaction(_iIdentityuserroleRepository);
                Done(this);

                /*pick up any primary keys, computed values etc*/
                boIdentityuserrole = new BOIdentityuserrole(daoIdentityuserrole);
                if (_boIdentityuserroleCollection != null)
                {
                    _boIdentityuserroleCollection.Add(boIdentityuserrole);
                }
            }
            catch (Exception ex)
            {
                Failed(this, ex);
                RollbackTransaction(_iIdentityuserroleRepository, "addIdentityuserrole");
                Handle(this, ex);
            }
        }
Ejemplo n.º 2
0
 public İdentityuserroleVm(IBOIdentityuserrole boİdentityuserrole)
 {
     UserId = boİdentityuserrole.UserId;
     RoleId = boİdentityuserrole.RoleId;
 }