public BooksController(IBookMock bookMock) { // if we pass a mock object to the constructor, we are unit testing so no db this.db = bookMock; }
public BooksController() { // if nothing passed to constructor, connect to the db (this is the default) this.db = new EFBooks(); }