예제 #1
0
        static void Main()
        {
            Database.SetInitializer(new MigrateDatabaseToLatestVersion<ArtistsDbContext, Configuration>());

            var db = new ArtistsDbContext();
            db.Artists.Count();
        }
예제 #2
0
 public SongController()
 {
     var db = new ArtistsDbContext();
     this.songData = new EfGenericRepository<Song>(db);
     this.genreData = new EfGenericRepository<Genre>(db);
     this.artistData = new EfGenericRepository<Artist>(db);
     this.albumData = new EfGenericRepository<Album>(db);
 }
 public CountryController()
 {
     var db = new ArtistsDbContext();
     this.countryData = new EfGenericRepository<Country>(db);
 }
 public ProducerController()
 {
     var db = new ArtistsDbContext();
     this.producerData = new EfGenericRepository<Producer>(db);
 }