public Int32 SaveVote(VoteDTO vote)
        {
            Int32 id;
            if (vote.Id == 0)
            {
                id = _unitOfWork.VoteRepository.Create(new Vote()
                {
                    Points = vote.Points,
                    Account = new Account()
                    {
                        Id = vote.Account.Id
                    },
                    Product = new Product()
                    {
                        Id = vote.Product.Id
                    }
                }).Id;
            }
            else
            {
                var vte = _unitOfWork.VoteRepository.Read().Where(x => x.Id == vote.Id).FirstOrDefault();
                vte.Points = vote.Points;
                vte.Account.Id = vote.Account.Id;
                vte.Product.Id = vote.Product.Id;
                id = vte.Id;

                _unitOfWork.VoteRepository.Update(vte);
            }
            _unitOfWork.SaveChanges();
            return id;
        }
 public Int32 SaveVote(VoteDTO vote)
 {
     return _voteManager.SaveVote(vote);
 }