public AlbumController() { var db = new ArtistsDbContext(); this.albumData = new EfGenericRepository <Album>(db); this.producerData = new EfGenericRepository <Producer>(db); }
public ArtistController() { var db = new ArtistsDbContext(); this.artistData = new EfGenericRepository <Artist>(db); this.countryData = new EfGenericRepository <Country>(db); }
static void Main() { Database.SetInitializer(new MigrateDatabaseToLatestVersion <ArtistsDbContext, Configuration>()); var db = new ArtistsDbContext(); db.Artists.Count(); }
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 static void Main() { var db = new ArtistsDbContext(); var artist = new Artist { Name = "Pesho", Gender = GenderType.Female }; db.Artists.Add(artist); db.SaveChanges(); Console.WriteLine(db.Artists.Count()); }
static void Main(string[] args) { Database.SetInitializer(new MigrateDatabaseToLatestVersion <ArtistsDbContext, Configuration>()); IArtistsDbContext db = new ArtistsDbContext(); Artist artist = new Artist { Name = "Madona", Gender = GenderType.Female }; //db.Configuration.LazyLoadingEnabled = false; //db.Configuration.ValidateOnSaveEnabled = false; db.Artists.Add(artist); db.SaveChanges(); //db.Configuration.LazyLoadingEnabled = true; //db.Configuration.ValidateOnSaveEnabled = true; Console.WriteLine(db.Artists.Count()); }
public ArtistDetailRepository(ArtistsDbContext context) : base(context) { }
public UnitOfWork(ArtistsDbContext context) { _context = context; ArtistDetails = new ArtistDetailRepository(_context); Artists = new ArtistRepository(_context); }
public GenreController() { var db = new ArtistsDbContext(); this.genreData = new EfGenericRepository <Genre>(db); }
public ArtistsController(ArtistsDbContext context) { _context = context; }
public SqlServerArtistsDbService(ArtistsDbContext context) { _context = context; }
public ArtistsContextDbService(ArtistsDbContext context) { _context = context; }