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); }
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; }