Exemple #1
0
        public async Task <Vote> AddVote(int categoryId, int postId, [FromBody] Vote vote)
        {
            vote.CategoryId = categoryId;
            vote.PostId     = postId;
            await _postVotesRepository.AddAsyn(vote);

            await _postVotesRepository.SaveAsync();

            return(vote);
        }