public void Startup() { pdao = new PerformanceDao(db); adoa = new ArtistDao(db); countrydao = new CountryDao(db); categorydao = new CategoryDao(db); vdao = new VenueDao(db); ps = ServiceFactory.CreatePerformanceService(db); pdao.DeleteAllPerformances(); adoa.DeleteAllArtists(); countrydao.DeleteAllCountries(); categorydao.DeleteAllCategories(); vdao.DeleteAllVenues(); }
public void Startup() { vdao = new VenueDao(db); catDao = new CategoryDao(db); couDao = new CountryDao(db); adao = new ArtistDao(db); pdao = new PerformanceDao(db); pdao.DeleteAllPerformances(); vdao.DeleteAllVenues(); adao.DeleteAllArtists(); catDao.DeleteAllCategories(); couDao.DeleteAllCountries(); foreach (var item in RepresentativeData.GetDefaultVenues()) { vdao.CreateVenue(item.Name, item.Shortcut, item.Latitude, item.Longitude); } foreach (var item in RepresentativeData.GetDefaultCategories()) { catDao.CreateCategory(item.Shortcut, item.Name); } foreach (var item in RepresentativeData.GetDefaultCountries()) { couDao.CreateCountry(item.Name, item.FlagPath); } foreach (var item in RepresentativeData.GetDefaultArtists()) { adao.CreateArtist(item.Name, item.Email, item.CategoryId, item.CountryId, item.PicturePath, item.VideoPath); } }
public void Startup() { adao = new ArtistDao(db); catDao = new CategoryDao(db); couDao = new CountryDao(db); pDao = new PerformanceDao(db); pDao.DeleteAllPerformances(); adao.DeleteAllArtists(); catDao.DeleteAllCategories(); couDao.DeleteAllCountries(); foreach (var item in RepresentativeData.GetDefaultCategories()) { catDao.CreateCategory(item.Shortcut, item.Name); } foreach (var item in RepresentativeData.GetDefaultCountries()) { couDao.CreateCountry(item.Name, item.FlagPath); } }