예제 #1
0
 // ДОПИСАТЬ
 public void AddUser(BllRole bllRole, BllUser bllUser)
 {
     DalRole dalRole = roleRepository.GetById(bllRole.Id);
     //??????????????????????????????????????????????????
     roleRepository.AddUser(dalRole, bllUser.ToDal());
     uow.Commit();
 }
예제 #2
0
 public void AddRole(BllUser bllUser, BllRole bllRole)
 {
     DalUser dalUser = userRepository.GetById(bllUser.Id);
     //??????????????????????????????????????????????????
     userRepository.AddRole(dalUser, bllRole.ToDal());
     uow.Commit();
 }
예제 #3
0
 public BllRole Update(BllRole bllRole)
 {
     DalRole oldUser = roleRepository.Update(bllRole.ToDalRole());
     uow.Commit();
     return oldUser == null ? null : oldUser.ToBll();
 }
예제 #4
0
 public IEnumerable<BllUser> GetUsers(BllRole bllRole)
 {
     return roleRepository.GetUsers(bllRole.ToDal()).Select(u => u.ToBll());
 }
예제 #5
0
 public void Delete(BllRole bllRole)
 {
     roleRepository.Delete(bllRole.ToDalRole());
     uow.Commit();
 }
예제 #6
0
 public BllRole Create(BllRole bllRole)
 {
     BllRole newRole = roleRepository.Create(bllRole.ToDalRole()).ToBll();
     uow.Commit();
     return newRole;
 }
        public override void CreateRole(string roleName)
        {
            var role = new BllRole() {Name = roleName};

            RoleService.Create(role);
        }
예제 #8
0
 public void RemoveRole(BllUser bllUser, BllRole bllRole)
 {
     DalUser dalUser = userRepository.GetById(bllUser.Id);
     userRepository.RemoveRole(dalUser, bllRole.ToDal());
     uow.Commit();
 }