Esempio n. 1
0
        public IList <Performance> QueryPerfomancesByVenue(int venueId)
        {
            IPerformanceDao dao      = DALFactory.CreatePerformanceDao(database);
            IVenueDao       venueDao = DALFactory.CreateVenueDao(database);
            Venue           v        = venueDao.findById(venueId);

            return(dao.findByProperty(typeof(Performance).GetProperty("Venue"), v));
        }
Esempio n. 2
0
        public IList <Performance> QueryPerfomancesByArtist(int artistId)
        {
            IPerformanceDao dao       = DALFactory.CreatePerformanceDao(database);
            IArtistDao      artistDao = DALFactory.CreateArtistDao(database);
            Artist          a         = artistDao.findById(artistId);

            return(dao.findByProperty(typeof(Performance).GetProperty("Artist"), a));
        }
        private bool canDeleteVenue(Venue venue)
        {
            IPerformanceDao dao = DALFactory.CreatePerformanceDao(database);

            return(dao.findByProperty(typeof(Performance).GetProperty("Venue"), venue).Count <= 0);
        }