// mock constructor, use mock data
 public AlbumsController(IAlbumsMock mock)
 {
     this.db = mock;
 }
 // default contructor, use live db
 public AlbumsController()
 {
     this.db = new EFAlbums();
 }
Esempio n. 3
0
 public AlbumsController()
 {
     //if nothing passed to constructor, connect to the db (this is the default)
     this.db = new EFAlbums();
 }
Esempio n. 4
0
 public AlbumsController(IAlbumsMock albumsMock)
 {
     //if we pass a mock object to the constructor, we are unit testing so no db
     this.db = albumsMock;
 }
Esempio n. 5
0
 public AlbumsController()
 {
     //if nothing is passed into controller, connect to db (Default)
     this.db = new EFAlbums();
 }