///<Summary> ///SaveNew ///This method persists a new Identityuserrole record to the store ///</Summary> ///<returns> ///void ///</returns> ///<parameters> /// ///</parameters> public virtual void SaveNew() { Doing(this); IDAOIdentityuserrole daoIdentityuserrole = _iIdentityuserroleRepository.New(); RegisterDataObject(_iIdentityuserroleRepository, _iIdentityuserroleRepository.BaseData(daoIdentityuserrole)); BeginTransaction(_iIdentityuserroleRepository, "savenewBOIdentityuserrole"); try { daoIdentityuserrole.UserId = _userId; daoIdentityuserrole.RoleId = _roleId; _iIdentityuserroleRepository.Insert(daoIdentityuserrole); CommitTransaction(_iIdentityuserroleRepository); Done(this); _userId = daoIdentityuserrole.UserId; _roleId = daoIdentityuserrole.RoleId; _isDirty = false; } catch (Exception ex) { Failed(this, ex); RollbackTransaction(_iIdentityuserroleRepository, "savenewBOIdentityuserrole"); Handle(this, ex); } }
///<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); } }
///<Summary> ///Constructor ///This constructor initializes the business object from its respective data object ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///DAOIdentityuserrole ///</parameters> protected internal BOIdentityuserrole(IDAOIdentityuserrole daoIdentityuserrole) { try { _userId = daoIdentityuserrole.UserId; _roleId = daoIdentityuserrole.RoleId; } catch { throw; } }
///<Summary> ///Initializer ///Initializer using primary key(s) ///</Summary> ///<returns> ///void ///</returns> ///<parameters> ///string userId, string roleId ///</parameters> public void Init(string userId, string roleId) { try { IDAOIdentityuserrole daoIdentityuserrole = _iIdentityuserroleRepository.SelectOne(userId, roleId); _userId = daoIdentityuserrole.UserId; _roleId = daoIdentityuserrole.RoleId; } catch { throw; } }
public virtual void Delete(IDAOIdentityuserrole daoIdentityuserrole) { daoIdentityuserrole.Delete(); }
public virtual void Insert(IDAOIdentityuserrole daoIdentityuserrole) { daoIdentityuserrole.Insert(); }
public virtual IzNorthwindConn_BaseData BaseData(IDAOIdentityuserrole daoIdentityuserrole) { return((IzNorthwindConn_BaseData)(DAOIdentityuserrole)daoIdentityuserrole); }