public bool RequestWatch(int projectid) { var userId = UserContext.CurrentUserId; LightSpeedRepository repository = new LightSpeedRepository(ObjectFactory.GetInstance <ApplicationSettings>()); var organisation = repository.GetOrgByUser(userId); if (repository.IsWatched(projectid, userId)) { repository.UnWatchProject(projectid, userId); } else { repository.WatchProject(projectid, userId, organisation?.Id ?? 0); } return(repository.IsWatched(projectid, userId)); }