public bool?GetPreviosInteraction(int jokeId) { if (!User.Identity.IsAuthenticated) { return(false); } var userId = GetCurrentUser().Id; var jokesRepo = new JokesRepository(_connectionString); var ulj = jokesRepo.GetUserLikedJoke(userId, jokeId); if (ulj == null) { return(false); } return(true); }