Пример #1
0
        public void InteractWithJoke(InteractViewModel viewModel)
        {
            var userRepo = new UserRepository(_connectionString);
            var user     = userRepo.GetByEmail(User.Identity.Name);
            var jokeRepo = new JokesRepository(_connectionString);

            jokeRepo.InteractWithJoke(user.Id, viewModel.JokeId, viewModel.Like);
        }
Пример #2
0
        public void InteractWithJoke(int jokeId, bool like)
        {
            var userRepo = new UserRepository(_connectionString);
            var user     = userRepo.GetByEmail(User.Identity.Name);
            var jokeRepo = new JokesRepository(_connectionString);

            jokeRepo.InteractWithJoke(user.Id, jokeId, like);
        }