Beispiel #1
0
        private bool VoteSong(Vote vote)
        {
            bool retorno = false;

            vote.Votes = 1;

            Database db = Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.CreateDatabase();

            IRepository <IVote>    dal          = new VoteRepository(db);
            IRepositoryBLL <IVote> votelRepoBll = new VoteRepositoryBLL(dal);
            IVoteBLL voteBLL = new VoteBLL(votelRepoBll);

            retorno = (voteBLL.VoteOnArtist(vote).VoteId > 0);

            return(retorno);
        }
Beispiel #2
0
        private bool VoteSong( Vote vote )
        {
            bool retorno = false;
            vote.Votes = 1;

            Database db = Microsoft.Practices.EnterpriseLibrary.Data.DatabaseFactory.CreateDatabase();

            IRepository<IVote> dal = new VoteRepository(db);
            IRepositoryBLL<IVote> votelRepoBll = new VoteRepositoryBLL(dal);
            IVoteBLL voteBLL = new VoteBLL(votelRepoBll);

            retorno = (voteBLL.VoteOnArtist(vote).VoteId > 0);

            return retorno;
        }