Пример #1
0
        public void UpdateVote(UpdateVoteCommand command)
        {
            var vote = _context.Votes.Find(command.Id);

            if (vote == null)
            {
                throw new Exception("Unable to find the vote");
            }

            command.UpdateVote(vote);
            _context.SaveChanges();
        }