// mock constructor, use mock data
 public AlbumsController(IAlbumsMock mock)
 {
     this.db = mock;
 }
 // default contructor, use live db
 public AlbumsController()
 {
     this.db = new EFAlbums();
 }
Ejemplo n.º 3
0
 public AlbumsController()
 {
     //if nothing passed to constructor, connect to the db (this is the default)
     this.db = new EFAlbums();
 }
Ejemplo 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;
 }
Ejemplo n.º 5
0
 public AlbumsController()
 {
     //if nothing is passed into controller, connect to db (Default)
     this.db = new EFAlbums();
 }