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