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() { catdao = new CategoryDao(db); coudao = new CountryDao(db); adao = new ArtistDao(db); vdao = new VenueDao(db); pdao = new PerformanceDao(db); aS = ServiceFactory.CreateArtistService(db); category = RepresentativeData.GetDefaultCategories()[0]; country = RepresentativeData.GetDefaultCountries()[0]; category = catdao.CreateCategory(category.Shortcut, category.Name); country = coudao.CreateCountry(country.Name, country.FlagPath); }
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); } }