Beispiel #1
0
        public bool Create(VoteDTO user)
        {
            bool b1 = ur.Create(Mapper.Map <VoteEntity>(user));

            if (b1)
            {
                if (user.vote == true)
                {
                    ar.IncrementVotes(user.answerId);
                }
                else
                {
                    ar.DecrementVotes(user.answerId);
                }
            }

            return(b1);
        }