// ДОПИСАТЬ public void AddUser(BllRole bllRole, BllUser bllUser) { DalRole dalRole = roleRepository.GetById(bllRole.Id); //?????????????????????????????????????????????????? roleRepository.AddUser(dalRole, bllUser.ToDal()); uow.Commit(); }
public void AddRole(BllUser bllUser, BllRole bllRole) { DalUser dalUser = userRepository.GetById(bllUser.Id); //?????????????????????????????????????????????????? userRepository.AddRole(dalUser, bllRole.ToDal()); uow.Commit(); }
public BllRole Update(BllRole bllRole) { DalRole oldUser = roleRepository.Update(bllRole.ToDalRole()); uow.Commit(); return oldUser == null ? null : oldUser.ToBll(); }
public IEnumerable<BllUser> GetUsers(BllRole bllRole) { return roleRepository.GetUsers(bllRole.ToDal()).Select(u => u.ToBll()); }
public void Delete(BllRole bllRole) { roleRepository.Delete(bllRole.ToDalRole()); uow.Commit(); }
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); }
public void RemoveRole(BllUser bllUser, BllRole bllRole) { DalUser dalUser = userRepository.GetById(bllUser.Id); userRepository.RemoveRole(dalUser, bllRole.ToDal()); uow.Commit(); }