// will only allow one ScreeningEntity per user. public bool SetScreeningEntity(int screeningEntityId, int userId) { ScreeningEntity se = this.screeningEntityRepository.Get(screeningEntityId); AdminUser u = this.userTasks.GetAdminUser(userId); if (u != null) { foreach (ScreeningEntity e in this.screeningEntityRepository.GetAll()) { u.RemoveScreeningEntity(e); } if (se != null) { u.AddScreeningEntity(se); } return(true); } return(false); }